New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract AP Page and Action caching from Rails #7833

Merged
merged 4 commits into from Oct 4, 2012

Conversation

Projects
None yet
7 participants
@frodsan
Contributor

frodsan commented Oct 3, 2012

This functionality will be available from actionpack-deprecated_caching gem.
The gem is currently hosted at https://github.com/frodsan/actionpack-deprecated_caching.

pd: I'm not sure about the name.

@guilleiguaran

This comment has been minimized.

Show comment
Hide comment
@guilleiguaran
Member

guilleiguaran commented Oct 3, 2012

:shipit:

@steveklabnik

This comment has been minimized.

Show comment
Hide comment
@steveklabnik
Member

steveklabnik commented Oct 3, 2012

:shipit:

@sikachu

This comment has been minimized.

Show comment
Hide comment
@sikachu
Member

sikachu commented Oct 3, 2012

:shipit:

FileUtils.rm_rf(File.dirname(FILE_STORE_PATH))
super
@store = ActiveSupport::Cache::MemoryStore.new
@controller = FragmentCachingMetalTestController.new

This comment has been minimized.

@rafaelfranca

rafaelfranca Oct 3, 2012

Member

Do we need all this setup?

@rafaelfranca

rafaelfranca Oct 3, 2012

Member

Do we need all this setup?

This comment has been minimized.

This comment has been minimized.

@rafaelfranca

rafaelfranca Oct 3, 2012

Member

Right

@rafaelfranca
@rafaelfranca

View changes

Show outdated Hide outdated actionpack/lib/action_controller/caching.rb
@andrewle

This comment has been minimized.

Show comment
Hide comment
@andrewle

andrewle Oct 3, 2012

I'd like to understand the motivations behind moving this out of rails core. I had a brief exchange with @steveklabnik and understand that maybe developers should just be using Rack::Cache/Varnish + proper HTTP caching headers, but action caching also allows you hit your middleware and filter stack, which is useful for authentication.

I'm all for moving page caching out though, as it bypasses the Rails stack altogether.

andrewle commented Oct 3, 2012

I'd like to understand the motivations behind moving this out of rails core. I had a brief exchange with @steveklabnik and understand that maybe developers should just be using Rack::Cache/Varnish + proper HTTP caching headers, but action caching also allows you hit your middleware and filter stack, which is useful for authentication.

I'm all for moving page caching out though, as it bypasses the Rails stack altogether.

@dhh

This comment has been minimized.

Show comment
Hide comment
@dhh

dhh Oct 4, 2012

Member

Action caching relies on old-school manual expiration. No bueno. Much better to control your cache using key-based view and possibly controller based caches.

You're still free to use this through the plugin, but it's not a good fit for core any more. The state of the art moved on.

Member

dhh commented Oct 4, 2012

Action caching relies on old-school manual expiration. No bueno. Much better to control your cache using key-based view and possibly controller based caches.

You're still free to use this through the plugin, but it's not a good fit for core any more. The state of the art moved on.

@rafaelfranca

This comment has been minimized.

Show comment
Hide comment
@rafaelfranca

rafaelfranca Oct 4, 2012

Member

@frodsan lets move this forward.

Please add a CHANGELOG entry and update the upgrading guide talking about the removal and pointing to the plugin.

Member

rafaelfranca commented Oct 4, 2012

@frodsan lets move this forward.

Please add a CHANGELOG entry and update the upgrading guide talking about the removal and pointing to the plugin.

rafaelfranca added a commit that referenced this pull request Oct 4, 2012

Merge pull request #7833 from frodsan/extract_ap_pages_actions_caching
Extract AP Page and Action caching from Rails

@rafaelfranca rafaelfranca merged commit b0a7068 into rails:master Oct 4, 2012

sgerrand pushed a commit to sgerrand/rails that referenced this pull request Nov 2, 2013

Refer to 37signals blog post for alternative
According to the rationale at rails#7833 (comment), we should recommend new users to follow DHH's approach outlined at http://37signals.com/svn/posts/3113-how-key-based-cache-expiration-works.

This is the first step, and perhaps in the future we can write some specific recommendations out.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment