instance method get_from_memory_cache

Ruby on Rails 2.2.3

Since v2.2.3 Last seen in v2.2.3 Private

Signature

get_from_memory_cache(filename, cache)

Returns a cache entry from a memory cache belonging to a certain filename. If no entry could be found for any reason, nil will be returned.

filename

Name of the file the cache entry belongs to.

cache

Memory cache to get entry from.

Parameters

filename req
cache req
Source
# File activesupport/lib/active_support/vendor/xml-simple-1.0.11/xmlsimple.rb, line 114
    def get_from_memory_cache(filename, cache)
      return nil unless cache[filename]
      return nil unless cache[filename][0] > File::mtime(filename).to_i
      return cache[filename][1]
    end

Defined in activesupport/lib/active_support/vendor/xml-simple-1.0.11/xmlsimple.rb line 114 · View on GitHub · Improve this page · Find usages on GitHub

Defined in XmlSimple::Cache

Type at least 2 characters to search.

↑↓ navigate · open · esc close