1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activesupport/test/cache
Jean Boussier 9de17ac4a4 Allow to set cache expiry as an absolute timestamp
Sometime it can be useful to set a cache entry expiry
not relative to current time, but as an absolute timestamps,
e.g.:

  - If you want to cache an API token that was provided to
    you with a precise expiry time.
  - If you want to cache something until a precise cutoff
    time, e.g. `expires_at: Time.now.at_end_of_hour`

This leaves the `@created_at` variable in a weird state,
but this is to avoid breaking the binary format.
2021-04-06 10:49:05 +02:00
..
behaviors Allow to set cache expiry as an absolute timestamp 2021-04-06 10:49:05 +02:00
stores Removes the monkey-patch for Marshal.load 2021-03-18 22:08:25 +01:00
behaviors.rb Removes the monkey-patch for Marshal.load 2021-03-18 22:08:25 +01:00
cache_entry_test.rb Allow to set cache expiry as an absolute timestamp 2021-04-06 10:49:05 +02:00
cache_key_test.rb allow running each test with pure ruby path/to/test.rb 2019-12-18 08:49:19 -06:00
cache_store_logger_test.rb allow running each test with pure ruby path/to/test.rb 2019-12-18 08:49:19 -06:00
cache_store_namespace_test.rb allow running each test with pure ruby path/to/test.rb 2019-12-18 08:49:19 -06:00
cache_store_setting_test.rb Require a for config.cache_store = :file_store 2021-02-23 10:42:43 -06:00
local_cache_middleware_test.rb allow running each test with pure ruby path/to/test.rb 2019-12-18 08:49:19 -06:00