Class OpenURI::Cache
In: lib/open-uri/cached.rb
Parent: Object

Methods

filename_from_url   get   invalidate   mkpath   set  

Attributes

cache_path  [RW] 

Public Class methods

Retrieve file content and meta data from cache @param [String] key @return [StringIO]

Invalidate cache for a key, optionally if older than time givan @param [String] key

  URL of content to be invalidated

@param [Time] time

  (optional): the maximum age at which the cached value is still acceptable

@return

  Returns 1 if a cached value was invalidated, false otherwise

Cache file content and metadata @param [String] key

  URL of content to be cached

@param [StringIO] value

  value to be cached, typically StringIO returned from `original_open_uri`

@return [StringIO]

  Returns value

Protected Class methods

[Validate]