aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPrathamesh Sonpatki <csonpatki@gmail.com>2016-01-31 16:31:24 +0530
committerPrathamesh Sonpatki <csonpatki@gmail.com>2016-02-01 15:16:37 +0530
commit437fa98e633e044e925c1fc7502a0a851b8bf718 (patch)
tree718574a69c3d09b12e34028779a23864e67cb368
parent96355e87cba247246234386b0af9273cc5d59db9 (diff)
downloadrails-437fa98e633e044e925c1fc7502a0a851b8bf718.tar.gz
rails-437fa98e633e044e925c1fc7502a0a851b8bf718.tar.bz2
rails-437fa98e633e044e925c1fc7502a0a851b8bf718.zip
Fix documentation related to `config.assets.cache_store` [ci skip]
- sprockets-rails no longer supports customizing cache store after rails/sprockets-rails@ecaeb27 using `config.assets.cache_store`. - Instead we need to configure it using block syntax. - Fixes #19835.
-rw-r--r--guides/source/asset_pipeline.md17
-rw-r--r--guides/source/configuring.md2
2 files changed, 6 insertions, 13 deletions
diff --git a/guides/source/asset_pipeline.md b/guides/source/asset_pipeline.md
index 5bdaf600ad..439f2bef3a 100644
--- a/guides/source/asset_pipeline.md
+++ b/guides/source/asset_pipeline.md
@@ -1177,19 +1177,14 @@ TIP: For further details have a look at the docs of your production web server:
Assets Cache Store
------------------
-The default Rails cache store will be used by Sprockets to cache assets in
-development and production. This can be changed by setting
-`config.assets.cache_store`:
+By default, Sprockets caches assets in `tmp/cache/assets` in development
+and production environments. This can be changed as follows:
```ruby
-config.assets.cache_store = :memory_store
-```
-
-The options accepted by the assets cache store are the same as the application's
-cache store.
-
-```ruby
-config.assets.cache_store = :memory_store, { size: 32.megabytes }
+config.assets.configure do |env|
+ env.cache = ActiveSupport::Cache.lookup_store(:memory_store,
+ { size: 32.megabytes })
+end
```
To disable the assets cache store:
diff --git a/guides/source/configuring.md b/guides/source/configuring.md
index 8a21d4062a..dfed46dd7d 100644
--- a/guides/source/configuring.md
+++ b/guides/source/configuring.md
@@ -159,8 +159,6 @@ pipeline is enabled. It is set to true by default.
* `config.assets.debug` disables the concatenation and compression of assets. Set to `true` by default in `development.rb`.
-* `config.assets.cache_store` defines the cache store that Sprockets will use. The default is the Rails file store.
-
* `config.assets.compile` is a boolean that can be used to turn on live Sprockets compilation in production.
* `config.assets.logger` accepts a logger conforming to the interface of Log4r or the default Ruby `Logger` class. Defaults to the same configured at `config.logger`. Setting `config.assets.logger` to false will turn off served assets logging.