Skip to content

Latest commit

 

History

History
26 lines (17 loc) · 688 Bytes

caching.md

File metadata and controls

26 lines (17 loc) · 688 Bytes

Flexirest: Caching

Expires and ETag based caching is enabled by default, but with a simple line in the application.rb/production.rb you can disable it:

Flexirest::Base.perform_caching = false

or you can disable it per classes with:

class Person < Flexirest::Base
  perform_caching false
end

If Rails is defined, it will default to using Rails.cache as the cache store, if not, you'll need to configure one with a ActiveSupport::Cache::Store compatible object using:

Flexirest::Base.cache_store = Redis::Store.new("redis://localhost:6379/0/cache")

< Combined example | Using callbacks >