Module: Hanami::Action::Cache

Defined in:
lib/hanami/action/cache.rb,
lib/hanami/action/cache/expires.rb,
lib/hanami/action/cache/directives.rb,
lib/hanami/action/cache/cache_control.rb,
lib/hanami/action/cache/conditional_get.rb

Overview

Cache type API

See Also:

  • ClassMethods#cache_control
  • ClassMethods#expires
  • ClassMethods#fresh

Since:

  • 0.3.0

Defined Under Namespace

Modules: CacheControl, Expires Classes: ConditionalGet, Directives, ETag, LastModified, NonValueDirective, ValueDirective

Constant Summary collapse

VALUE_DIRECTIVES =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Cache-Control directives which have values

Since:

  • 0.3.0

%i[max_age s_maxage min_fresh max_stale].freeze
NON_VALUE_DIRECTIVES =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Cache-Control directives which are implicitly true

Since:

  • 0.3.0

%i[public private no_cache no_store no_transform must_revalidate proxy_revalidate].freeze

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Override Ruby’s hook for modules. It includes exposures logic

Parameters:

  • base (Class)

    the target action

See Also:

Since:

  • 0.3.0



22
23
24
25
26
# File 'lib/hanami/action/cache.rb', line 22

def self.included(base)
  base.class_eval do
    include CacheControl, Expires
  end
end