File: //usr/local/rvm/gems/default/doc/activesupport-6.1.4.1/ri/ActiveSupport/Cache/Store/cdesc-Store.ri
U:RDoc::NormalClass[iI"
Store:ETI" ActiveSupport::Cache::Store;TI"Object;To:RDoc::Markup::Document:@parts[o;;[o:RDoc::Markup::Paragraph;[
I"CAn abstract cache store class. There are multiple cache store ;TI"Oimplementations, each having its own additional features. See the classes ;TI"1under the ActiveSupport::Cache module, e.g. ;TI"NActiveSupport::Cache::MemCacheStore. MemCacheStore is currently the most ;TI"7popular cache store for large production websites.;To:RDoc::Markup::BlankLine o; ;[I"MSome implementations may not support all methods beyond the basic cache ;TI"Amethods of +fetch+, +write+, +read+, +exist?+, and +delete+.;T@o; ;[I"HActiveSupport::Cache::Store can store any serializable Ruby object.;T@o:RDoc::Markup::Verbatim;[
I"3cache = ActiveSupport::Cache::MemoryStore.new
;TI"
;TI"#cache.read('city') # => nil
;TI"&cache.write('city', "Duckburgh")
;TI"+cache.read('city') # => "Duckburgh"
;T:@format0o; ;[I"MKeys are always translated into Strings and are case sensitive. When an ;TI"Mobject is specified as a key and has a +cache_key+ method defined, this ;TI"Imethod will be called to define the key. Otherwise, the +to_param+ ;TI"Lmethod will be called. Hashes and Arrays can also be used as keys. The ;TI"Kelements will be delimited by slashes, and the elements within a Hash ;TI"2will be sorted by key so they are consistent.;T@o;;[I"9cache.read('city') == cache.read(:city) # => true
;T;0o; ;[I"Nil values can be cached.;T@o; ;[
I"MIf your cache is on a shared infrastructure, you can define a namespace ;TI"Ofor your cache entries. If a namespace is defined, it will be prefixed on ;TI"Oto every key. The namespace can be either a static value or a Proc. If it ;TI"Nis a Proc, it will be invoked when each key is evaluated so that you can ;TI".use application logic to invalidate keys.;T@o;;[I"Pcache.namespace = -> { @last_mod_time } # Set the namespace to a variable
;TI"T@last_mod_time = Time.now # Invalidate the entire cache by changing namespace
;T;0o; ;[
I"HCached data larger than 1kB are compressed by default. To turn off ;TI"Icompression, pass <tt>compress: false</tt> to the initializer or to ;TI"Eindividual +fetch+ or +write+ method calls. The 1kB compression ;TI"Mthreshold is configurable with the <tt>:compress_threshold</tt> option, ;TI"specified in bytes.;T:
@fileI" lib/active_support/cache.rb;T:0@omit_headings_from_table_of_contents_below0;
0;0[[
I"options;TI"R;T:publicFI" lib/active_support/cache.rb;T[
I"silence;T@H;F@I[
I"
silence?;T@H;F@I[U:RDoc::Constant[i I"DEFAULT_CODER;TI"/ActiveSupport::Cache::Store::DEFAULT_CODER;T;0o;;[ ;
@D;0@D@cRDoc::NormalClass0[ [[I"
class;T[[;[[I"new;T@I[:protected[ [:private[[I""ensure_connection_pool_added!;T@I[I"retrieve_pool_options;T@I[I"
instance;T[[;[[I"cleanup;T@I[I"
clear;T@I[I"decrement;T@I[I"delete;T@I[I"delete_matched;T@I[I"delete_multi;T@I[I"exist?;T@I[I"
fetch;T@I[I"fetch_multi;T@I[I"increment;T@I[I" mute;T@I[I" read;T@I[I"read_multi;T@I[I"
silence!;T@I[I"
write;T@I[I"write_multi;T@I[;[ [;[[I"delete_entry;T@I[I"delete_multi_entries;T@I[I"deserialize_entry;T@I[I"expanded_key;T@I[I"expanded_version;T@I[I"get_entry_value;T@I[I"handle_expired_entry;T@I[I"instrument;T@I[I"key_matcher;T@I[I"merged_options;T@I[I"namespace_key;T@I[I"normalize_key;T@I[I"normalize_version;T@I[I"read_entry;T@I[I"read_multi_entries;T@I[I"save_block_result_to_cache;T@I[I"serialize_entry;T@I[I"write_entry;T@I[I"write_multi_entries;T@I[ [U:RDoc::Context::Section[i 0o;;[ ;
0;0[@DI"ActiveSupport::Cache;TcRDoc::NormalModule