aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/cache
Commit message (Collapse)AuthorAgeFilesLines
* Enable `Layout/LeadingCommentSpace` to not allow cosmetic changes in the futureRyuta Kamizono2017-12-141-1/+1
| | | | Follow up of #31432.
* MemCacheStore: Support expiring countersTakumasa Ochi2017-11-201-0/+16
| | | | | | | Support `expires_in` in `ActiveSupport::Cache::MemCacheStore#increment` and `#decrement`. Closes #30716.
* Cache: Enable compression by default for values > 1kB.Jeremy Daer2017-11-132-3/+20
| | | | | | | | | | | | | Compression has long been available, but opt-in and at a 16kB threshold. It wasn't enabled by default due to CPU cost. Today it's cheap and typical cache data is eminently compressible, such as HTML or JSON fragments. Compression dramatically reduces Memcached/Redis mem usage, which means the same cache servers can store more data, which means higher hit rates. To disable compression, pass `compress: false` to the initializer.
* Built-in Redis cache storeJeremy Daer2017-11-133-3/+162
| | | | | | | | | | | * Supports vanilla Redis, hiredis, and Redis::Distributed. * Supports Memcached-like sharding across Redises with Redis::Distributed. * Fault tolerant. If the Redis server is unavailable, no exceptions are raised. Cache fetches are treated as misses and writes are dropped. * Local cache. Hot in-memory primary cache within block/middleware scope. * `read_/write_multi` support for Redis mget/mset. Use Redis::Distributed 4.0.1+ for distributed mget support. * `delete_matched` support for Redis KEYS globs.
* Fixes ActiveSupport::Cache::FileStore#cleanup bug which prevented it from ↵Erich Soares Machado2017-10-031-0/+1
| | | | cleaning up the expired cache keys
* Use File::NULL instead of "/dev/null"Kazuhiro NISHIYAMA2017-07-311-1/+1
|
* [Active Support] `rubocop -a --only Layout/EmptyLineAfterMagicComment`Koichi ITO2017-07-1119-0/+19
|
* Use frozen-string-literal in ActiveSupportKir Shatrov2017-07-0919-0/+19
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-0219-19/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Merge pull request #29540 from kirs/rubocop-frozen-stringMatthew Draper2017-07-0219-0/+19
|\ | | | | | | Enforce frozen string in Rubocop
| * Enforce frozen string in RubocopKir Shatrov2017-07-0119-0/+19
| |
* | Make ActiveSupport frozen string literal friendly.Pat Allan2017-06-203-7/+7
|/ | | | | | | The ActiveSupport test suite only passes currently if it uses the latest unreleased commits for dalli, and a patch for Builder: https://github.com/tenderlove/builder/pull/6 Beyond that, all external dependencies (at least, to the extent they’re used by ActiveSupport) are happy, including Nokogiri as of 1.8.0.
* Cache: test coverage for cleanup behavior with local cache strategyEugene Kenny2017-06-101-0/+15
| | | | | | No need to pass `#cleanup` options through to `LocalCache#clear`. Fixes #29081. References #25628.
* Split up the cache test suite so it's easier to understand and extend (#29404)Jeremy Daer2017-06-1019-0/+1383
Split up the caching tests as prep for adding a new cache store. Slices the mega test/caching_test.rb into behavior modules, concrete store tests, and cross-cutting store tests. Considering moving cache store behavior modules into lib/ so they may be used for acceptance testing by third parties.