Commit Graph

90 Commits

Author SHA1 Message Date
Jeremy Daer
ed10016687 Cache: Enable compression by default for values > 1kB.
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.
2017-11-13 22:02:45 -07:00
Jeremy Daer
9f8ec35352 Built-in Redis cache store
* 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.
2017-11-13 19:45:47 -07:00
Yauheni Dakuka
62d547c6a4 Upcase js [ci skip] 2017-09-18 09:15:33 +03:00
Eileen M. Uchitelle
86389b4143 Merge pull request #29964 from gwincr11/cg-partial-caching
Add documentation about template partial caching
2017-08-30 08:38:53 -04:00
Cory Gwin @gwincr11
49f6c47e41 Add documentation about template partial caching
Motivation:
  - #29423 surfaced some confusion about how template caching works when
  using partials across files with different mime types. This doc
  attempts to explain how this can be accomplished.
2017-08-30 08:36:58 -04:00
Ryuta Kamizono
c4e576fc7f It should be "the resulting cache key", not "the resulting cache-key" [ci skip]
This is a partial revert of 07402aa1307a4ff71b4ef6581f95b8612238a6af.

I also changed "cache-key" to "cache key" because "cache-key" appears
only once in the repo.

```
% git grep '\bcache-key\b' | wc -l
1

% git grep '\bcache key\b' | wc -l
28
```
2017-08-29 20:44:04 +09:00
Yoshiyuki Hirano
ddc8f433a9 Update Caching with Rails guide [ci skip] 2017-08-29 06:42:36 +09:00
Ryuta Kamizono
4b3ee155f9 Remove trailing spaces [ci skip] 2017-08-27 22:29:56 +09:00
Vipul A M
684de497a8 Doc cleanup for caching guide [ci skip] (#28556) 2017-03-24 18:14:01 +05:30
brchristian
9e14f42a2e Additional explanation about cache implementations 2017-03-23 10:00:04 -07:00
Erol Fornoles
17545b4d88
Fix typo in Caching with Rails Guide [skip ci] 2017-03-21 09:21:51 +08:00
James Baer
da7c4126d3 Improve Caching with Rails Guides [ci skip]
Adds the "Caching in Development" section to
demonstrate usage of the dev:cache task in development mode.

Also, makes a small grammatical correction in section 2.4.
2017-03-17 16:02:24 -04:00
Ryunosuke Sato
b9e98d62c2 Remove the word "mongrel" from documents
Currently mongrel is not maintained.
And it couldn't be built with any Ruby versions that
supported by Rails.

It is reasonable to remove the word "mongrel" in order to avoid
confusion from newcomer.
2016-09-07 01:59:37 +09:00
Santosh Wadghule
80f777e1c0 Add documentation for http_cache_forever. [ci skip] 2016-08-10 20:27:29 +05:30
प्रथमेश Sonpatki
56527bb737 Merge pull request #25928 from mechanicles/info-for-cache-fetch-block
Add proper description for `Rails.cache.fetch` [ci skip]
2016-07-24 10:13:41 +05:30
Santosh Wadghule
d4f1b8090a Proper description for Rails.cache.fetch [ci skip] 2016-07-24 09:37:44 +05:30
Santosh Wadghule
8ad6260538 Explain meaning of the code very well and Remove confusion. [ci skip]
Code like `render(topics) => render("topics/topic")` adds confusion
for the readers. On first impression, that code feels like hash kind
of data, but it's not. So make it more clear and meaningful.
2016-07-23 09:56:35 +05:30
Jon Moss
303dac30c2
md5 --> MD5
[ci skip]
2016-05-16 15:51:05 -04:00
Roque Pinel
e08232cda2 Fixes for the strong & weak ETags guide [ci skip] 2016-04-07 23:18:50 -04:00
Santosh Wadghule
0287e1fccb Update documentation based on the new changes for strong & weak ETags [ci skip]
- Update info for weak ETag
- Add info for strong ETag
- Add examples for strong and weak ETags
- Display difference between generated strong and weak ETags strings.
2016-04-05 15:28:28 +05:30
Vipul A M
6025714146 s/responsibilty/responsibility/
s/symantically/semantically/

[ci skip]
2016-03-22 20:03:27 +05:30
Kasper Timm Hansen
2ef8a0e2b8 [ci skip] Make collection caching explicit in guides.
Since f6e4814 was written we've made collection caching explicit.

Thus the documentation is outdated and needs a rewrite.
2016-03-03 20:53:49 +01:00
Chashmeet Singh
861b98def8 Updated file documentation [ci skip] 2016-02-24 23:13:43 +05:30
Abhishek Yadav
a6f8526ee6 changes caching guide to add note on weak etags 2016-02-24 22:48:28 +05:30
Genadi Samokovarov
c29fbd3c7a ApplicationRecord documentation pass
This is a pass over the documentation which fills the missing gaps of
`ApplicationRecord`.

[ci skip]
2015-12-17 11:56:35 +01:00
Rafael Mendonça França
a951d5b093 Revert "Fixed a few grammar issues."
This reverts commit 16ce41b7f4449d6df15df30d69aef18da6510f36.

Reason: See
16ce41b7f4 (commitcomment-14475125)
2015-11-18 13:47:45 -02:00
David Chen
16ce41b7f4 Fixed a few grammar issues. 2015-11-18 14:04:00 +08:00
Robin Dupret
63c03077f3 Correctly close a fenced code block [ci skip] 2015-08-03 13:22:42 +02:00
claudiob
39e0d811b7 Improve the "Caching with Rails" guide's introduction [ci skip] 2015-08-03 12:08:36 +02:00
Robin Dupret
f6e48148be Add a section about "Collection caching" [ci skip] 2015-08-03 12:08:33 +02:00
Robin Dupret
c21cc877e0 Add a "Managing dependencies" part to the caching guide [ci skip] 2015-07-28 23:20:17 +02:00
Robin Dupret
a934b571e5 Tiny edits to the "Caching with Rails" guide
* Fix a few typos
* Remove reference to the old `memcache-client` gem
* Remove the "ActiveSupport::Cache::EhCacheStore" part from the guide as
  the gem doesn't seem to be maintained anymore.
* Move the "Custom Cache Stores" part under the "AS::Cache::Store" part
  as they are pretty related.

[ci skip]
2015-07-28 15:06:04 +02:00
Robin Dupret
48609420b8 Merge pull request #20736 from antoine-lizee/docs
[ci skip] docs: making clear that perform_caching has a limited impact
2015-07-13 22:41:45 +02:00
antoine.lizee
89a55edd59 [ci skip] doc: making clear that perform_caching has a limited impact 2015-07-13 11:35:18 -07:00
Anton Chuchkalov
0d7185d138 fix typo in caching guide [ci skip] 2015-07-12 16:11:52 +03:00
Robin Dupret
068ab23a33 Tiny documentation fixes [ci skip] 2015-06-18 11:38:08 +02:00
Thomas Osborn
9c1cfcbccc updates caching guide to reflect current Rails capabilities [ci skip] 2015-06-17 16:40:44 -07:00
Tim Wade
ae5c5b2237
Fix style/grammar/typos in Caching guide.
* avoid using unnecessary commas
* fix some typos
2015-04-29 23:36:35 -07:00
Yury Otcheski
8526921d29 Guides mistake about page caching.
DHH's key-based cache expiration isn't alternative to page caching. It's true about action caching but not page caching. I propose to remove this line as confusing, page caching is still best if applicable.
[ci skip]
2015-02-27 18:36:28 +03:00
Xavier Noria
7ba24831d7 Merge pull request #18503 from vipulnsward/guides-in-on
Changed `IN` to `ON` in markdown renderer condition
2015-01-14 11:35:34 +01:00
Vipul A M
5cfaf5a46e - Changed IN to ON in markdown renderer condition
- Changed `IN` to `ON` in all note sentences in guides.
2015-01-14 11:52:13 +05:30
Jose Luis Duran
4d4f2df36e Re-add section in SQL Caching
This section was accidentally removed in 4b5e424441149cf0f61a8182f4a92999577ce59a, and partially re-added in dc14b893e5904acb37ac327478f3880f33094b7a.

[ci skip]
2015-01-11 17:17:21 -02:00
Elaine Fang
6968ef44e2 Update grammar [ci skip] 2014-12-24 15:01:06 -05:00
Xavier Noria
7702974281 warn about reading guides in GitHub
References #18148.
2014-12-23 23:32:50 +01:00
Harshad Sabne
4b9d22e959 Update caching_with_rails.md [ci skip]
Highlight methods
2014-08-31 17:22:01 +05:30
José Valim
57f5b00ba4 Remove more references to respond_with 2014-08-17 13:20:23 -04:00
Nishant Modak
da5ac71885 correct markdown usage [ci skip] 2014-07-09 01:32:44 +05:30
Akshay Vishnoi
b6760d8f14 [ci skip] Fix capitalization 2014-06-07 14:23:27 +05:30
Yves Senn
e83a6ff5b7 remove trailing whitespace. [ci skip] 2014-05-17 00:24:50 +02:00
Vipul A M
73bfb51011 Change links to 37signals and svn blog to point to new destinations. [ci skip] 2014-04-12 12:46:04 +05:30