X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=vendor%2Frails%2Factivesupport%2Flib%2Factive_support%2Fcache%2Fmemory_store.rb;fp=vendor%2Frails%2Factivesupport%2Flib%2Factive_support%2Fcache%2Fmemory_store.rb;h=0000000000000000000000000000000000000000;hb=36d9f3351a3b4e8159279445190e2287ffdea86c;hp=1b30d49155e4601eb6366848ca4c7c50e5fed675;hpb=913cf6054b1d29b5d2f5e620304af7ee77cc1f1f;p=feedcatcher.git diff --git a/vendor/rails/activesupport/lib/active_support/cache/memory_store.rb b/vendor/rails/activesupport/lib/active_support/cache/memory_store.rb deleted file mode 100644 index 1b30d49..0000000 --- a/vendor/rails/activesupport/lib/active_support/cache/memory_store.rb +++ /dev/null @@ -1,52 +0,0 @@ -module ActiveSupport - module Cache - # A cache store implementation which stores everything into memory in the - # same process. If you're running multiple Ruby on Rails server processes - # (which is the case if you're using mongrel_cluster or Phusion Passenger), - # then this means that your Rails server process instances won't be able - # to share cache data with each other. If your application never performs - # manual cache item expiry (e.g. when you're using generational cache keys), - # then using MemoryStore is ok. Otherwise, consider carefully whether you - # should be using this cache store. - # - # MemoryStore is not only able to store strings, but also arbitrary Ruby - # objects. - # - # MemoryStore is not thread-safe. Use SynchronizedMemoryStore instead - # if you need thread-safety. - class MemoryStore < Store - def initialize - @data = {} - end - - def read(name, options = nil) - super - @data[name] - end - - def write(name, value, options = nil) - super - @data[name] = value.freeze - end - - def delete(name, options = nil) - super - @data.delete(name) - end - - def delete_matched(matcher, options = nil) - super - @data.delete_if { |k,v| k =~ matcher } - end - - def exist?(name,options = nil) - super - @data.has_key?(name) - end - - def clear - @data.clear - end - end - end -end