module Sequel::Plugins::StaticCacheCache::ClassMethods

Public Instance Methods

dump_static_cache_cache() click to toggle source

Dump the in-memory cached rows to the cache file.

   # File lib/sequel/plugins/static_cache_cache.rb
28 def dump_static_cache_cache
29   static_cache_cache = {}
30   @static_cache_cache.sort.each do |k, v|
31     static_cache_cache[k] = v
32   end
33   File.open(@static_cache_cache_file, 'wb'){|f| f.write(Marshal.dump(static_cache_cache))}
34   nil
35 end