private Method

XmlSimple.put_into_cache(data, filename)

Caches the data belonging to a certain file.

data:Data to be cached.
filename:Name of file the data was read from.

Source Code

# File active_support/vendor/xml-simple-1.0.11/xmlsimple.rb, line 1003
def put_into_cache(data, filename)
  if @options.has_key?('cache')
    @options['cache'].each { |scheme|
      case(scheme)
      when 'storable'
        @@cache.save_storable(data, filename)
      when 'mem_share'
        @@cache.save_mem_share(data, filename)
      when 'mem_copy'
        @@cache.save_mem_copy(data, filename)
      else
        raise ArgumentError, "Unsupported caching scheme: <#{scheme}>."
      end
    }
  end
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.