Created
August 12, 2014 15:48
-
-
Save dphase/5efdb22e56d1891a9e00 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Determines whether or not to cache a dataset based on the configuration | |
# settings of the plugin. | |
#-- | |
# TODO: Specify a place to find those settings. However, where those are | |
# applied is currently in flux. Also, further document how this process | |
# actually works. | |
#++ | |
def is_cacheable_by_default? | |
cache_by_default = cache_options[:cache_by_default] | |
return false unless cache_by_default | |
return true if cache_by_default[:always] | |
proc = cache_by_default[:proc] || CACHE_BY_DEFAULT_PROC | |
proc.call(self, cache_by_default) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment