Skip to content
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

@frodsan
Copy link
Contributor

@frodsan 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
Copy link
Member

@guilleiguaran guilleiguaran commented Oct 3, 2012

:shipit:

2 similar comments
@steveklabnik
Copy link
Member

@steveklabnik steveklabnik commented Oct 3, 2012

:shipit:

@sikachu
Copy link
Member

@sikachu 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?

This comment has been minimized.

# In cases where a request already has an extension, such as <tt>.xml</tt>
# or <tt>.rss</tt>, page caching will not add an extension. This allows it
# to work well with RESTful apps.
config_accessor :page_cache_extension

This comment has been minimized.

@rafaelfranca

rafaelfranca Oct 3, 2012
Member

I think is better to rename this to default_static_extension

This comment has been minimized.

@frodsan

frodsan Oct 3, 2012
Author Contributor

Ok, I'll ping you when it's done. Thanks <3!

This comment has been minimized.

@rafaelfranca

rafaelfranca Oct 3, 2012
Member

We will need to add backward compatibility to page_cache_extension and deprecate it

@andrewle
Copy link

@andrewle 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
Copy link
Member

@dhh 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
Copy link
Member

@rafaelfranca 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
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
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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

7 participants
You can’t perform that action at this time.