Created
March 15, 2011 10:18
-
-
Save zdavatz/870551 to your computer and use it in GitHub Desktop.
persistable.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A Persistable instance can be _prefetchable_. This means that the object | |
# can be loaded at startup by calling ODBA.cache.prefetch, and that it will | |
# never expire from the Cache. The prefetch status can be controlled per | |
# instance by setting the instance variable @odba_prefetch, and per class by | |
# overriding the module constant ODBA_PREFETCH | |
def odba_prefetch? | |
@odba_prefetch \ | |
|| (defined?(self::class::ODBA_PREFETCH) && self::class::ODBA_PREFETCH) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment