module Sequel::Plugins::StaticCacheCache

The static_cache_cache plugin allows for caching the row content for the current class and subclasses that use the static_cache or subset_static_cache plugins. Using this plugin can avoid the need to query the database every time loading the static_cache plugin into a model (static_cache plugin) or using the cache_subset method (subset_static_cache plugin).

Usage:

# Make all model subclasses that use the static_cache plugin use
# the cached values in the given file
Sequel::Model.plugin :static_cache_cache, "static_cache.cache"

# Make the AlbumType model the cached values in the given file,
# should be loaded before the static_cache plugin
AlbumType.plugin :static_cache_cache, "static_cache.cache"