Santiago Pastorino
7c79996c67
Rack body respond to each and not to join
...
This fixes undef `to_str' for Rack::Chunked::Body when using
caches_action + streaming on an action
Closes #5027
2012-02-14 21:53:38 -02:00
José Valim
c4ef3d34ee
Remove unecessary config_accessors.
2011-12-24 10:52:45 +01:00
José Valim
ba868929d3
Provide a class optin for page_cache_compression.
2011-12-24 10:52:45 +01:00
Andrey A.I. Sitnik
754823dd66
Gzip files on page caching
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2011-12-24 10:52:45 +01:00
Thomas von Deyen
0da31a1839
Allowing string as url argument for expire_action
2011-12-06 13:05:15 +01:00
Aaron Patterson
62a86748ae
this should never return nil, so no use for "try"
2011-10-31 15:17:16 -04:00
Christopher Meiklejohn
6cbe4223a7
Ensure that the format isn't applied twice to the cache key, else it becomes impossible to target with expire_action.
2011-10-31 15:10:07 -04:00
Alexey Vakhov
a4515b60e3
Remove unnecessary dup in expire_page
2011-10-08 11:01:31 +04:00
Milan Dobrota
9b08afd2f4
if ... nil? is more expensive than unless
2011-09-04 10:44:08 -05:00
Oge Nnadi
aa0d3cece8
Typo fix
2011-08-13 16:22:35 -07:00
Akira Matsuda
a3683fd0e4
find(:all) => all
2011-07-08 06:13:21 +09:00
Matt Jankowski
2fd1f2e843
clarify which url would be used to cache a page when options are not provided to #cache_page to determine that url
2011-06-26 19:44:55 -04:00
Matt Jankowski
eccd5cb610
elaborate on how web server configuration to check for static files on disk enables page caching to work without hitting the app server stack
2011-06-26 19:41:49 -04:00
Jeroen Jacobs
791127eee4
Fixes an issue where cache sweepers with only after filters would have no controller object
...
It would raise undefined method controller_name for nil
2011-06-21 12:34:00 +02:00
Santiago Pastorino
1d3618a9b4
remove warning: assigned but unused variable
2011-06-08 00:26:09 -03:00
Sebastian Martinez
fcdb5dc557
Remove extra white spaces on ActionPack docs.
2011-05-23 20:22:33 -03:00
Ryan Bigg
198f3883fa
Proc objects for cache_path for caches_action no longer need controller object, nor to use send when calling routing helpers
2011-03-26 11:34:05 +11:00
R.T. Lechow
87e9e3f9af
Action Pack typos.
2011-03-05 11:56:35 +01:00
Cheah Chu Yeow
2ee5555744
Fix Action caching bug where an action that has a non-cacheable response always renders a nil response body. It now correctly renders the response body.
...
Note that only GET and HTTP 200 responses can be cached.
[#6480 state:committed]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2011-03-02 13:11:07 -02:00
Andre Arko
10cab35d3b
Allow page_cache_directory to be set as a Pathname
...
For example, page_cache_directory = Rails.root.join("public/cache")
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2011-02-06 17:55:38 -02:00
Santiago Pastorino
a61e3acef2
html_safe.to_str makes no sense
2011-01-11 18:57:35 -02:00
Rizwan Reza
9dfa06acb4
Edits to caching/fragments.
2010-12-23 16:29:40 +03:30
Santiago Pastorino
ab2bde45f8
Remove require AS::Concern from places where is already in
2010-12-19 19:15:26 -02:00
Santiago Pastorino
f249d07c44
Add missing require
2010-12-19 14:00:08 -02:00
Neeraj Singh
0027b65421
Ensure that while caching a page rails takes into
...
account the resolved mime type for the request
[#6110 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-12-09 16:14:57 +01:00
Xavier Noria
0aa78826e4
makes a pass to the action caching rdoc
2010-12-08 21:20:53 +01:00
Neeraj Singh
3ac844deec
Add to documentation that action caching does
...
handle HTTP_ACCEPT attribute properly and might
provide wrong result. Use params[:format] to
avoid this issue.
2010-12-06 16:38:47 -05:00
Krekoten' Marjan
608bf7b72c
AC::Caching DRYup
...
Remove ActionController::Caching::Pages#caching_allowed
because it duplicates ActionController::Caching#caching_allowed?
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2010-10-18 17:30:28 -02:00
Emilio Tagua
71acc2737a
Move uri parser to AS as URI.parser method to reuse it in AP and ARes.
2010-09-28 11:38:35 +08:00
Emilio Tagua
2f326b7f27
Remove warning "URI.unescape is obsolete" from actionpack.
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2010-09-27 16:43:04 -03:00
Emilio Tagua
5d773f8ded
Remove warning "URI.unescape is obsolete" from actionpack.
2010-09-27 11:19:20 -03:00
Joost Baaij
930102968a
Escape 'caching' when used in a sentence; remove unnessesary quotes
2010-08-26 21:58:57 +02:00
Neeraj Singh
db23a95a61
cache_sweeper yields blank output
...
[#3914 state:open]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-08 23:20:04 +02:00
Justin George
731d4392e4
Change event namespace ordering to most-significant first [ #4504 state:resolved]
...
More work still needs to be done on some of these names
(render_template.action_view and render_template!.action_view particularly)
but this allows (for example) /^sql/ to subscribe to all
the various ORMs without further modification
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-02 22:45:54 +02:00
Neeraj Singh
d793d30776
ActionCachingTestController rescues from all exceptions. Making sure that all the tests check for valid response. [ #4468 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-04-29 12:48:34 +02:00
José Valim
4163ccec23
Clean up the config object in ActionPack. Create config_accessor which just delegates to the config object, reducing the number of deprecations and add specific tests.
2010-04-22 12:00:13 +02:00
Santiago Pastorino and Carl Lerche
0ea434e2f4
Make perform_caching work again, with the tests passing and backward compatible
2010-04-15 18:25:08 -03:00
Santiago Pastorino
a618ad358a
Make use of config.perform_caching
2010-04-14 22:35:13 -07:00
Anil Wadghule
84e46437fa
Replace 'RAILS_ROOT' to 'Rails.root' and 'RAILS_ENV' to 'Rails.env' in significant places.
2010-04-12 22:53:49 +05:30
José Valim
4e92134dfa
Fix a bug in ActionDispatch::Static where Rails cannot find assets if started in another directory which is not the RAILS_ROOT.
2010-04-08 12:52:37 +02:00
wycats
f868c2afa9
response_body is an Array in 1.9, so an Array was being pushed onto the cache
2010-03-19 18:56:06 -07:00
Carlhuda
71c9337f45
All tests pass without memoizing view_context
2010-03-18 15:52:43 -07:00
Carlhuda
523d0f3700
Remove caching's dependency on view_context. Also, make it so that the layout is always rendered the same way (so that layout dependencies on the action actually being rendered aren't masked on the first render)
2010-03-18 14:55:29 -07:00
Carlhuda
3deb60e6b4
@layout is a confusing name... use @cache_layout
2010-03-18 14:55:29 -07:00
Carlhuda
c61ed70b00
Some more tweaks on <% %>.
...
* The cache helper is now semantically "mark this region for caching"
* As a result, <% x = cache do %> no longer works
2010-03-16 11:43:04 -07:00
Jeremy Kemper
748c78ffc8
RJS may cache an array
2010-03-15 23:48:32 -07:00
Carlhuda
9de83050d3
Add deprecation notices for <% %>.
...
* The approach is to compile <% %> into a method call that checks whether
the value returned from a block is a String. If it is, it concats to the buffer and
prints a deprecation warning.
* <%= %> uses exactly the same logic to compile the template, which first checks
to see whether it's compiling a block.
* This should have no impact on other uses of block in templates. For instance, in
<% [1,2,3].each do |i| %><%= i %><% end %>, the call to each returns an Array,
not a String, so the result is not concatenated
* In two cases (#capture and #cache), a String can be returned that should *never*
be concatenated. We have temporarily created a String subclass called NonConcattingString
which behaves (and is serialized) identically to String, but is not concatenated
by the code that handles deprecated <% %> block helpers. Once we remove support
for <% %> block helpers, we can remove NonConcattingString.
2010-03-15 14:50:43 -07:00
Jeremy Kemper
c937da9e2f
to_str works here
2010-03-15 11:18:45 -07:00
Jeremy Kemper
16572fd46e
read_ and write_fragment cache preserve html safety yet cache strings only
2010-03-14 19:09:32 -07:00
Jeremy Kemper
47bc138fc1
Write strings to fragment cache, not outputbuffers
2010-03-11 17:43:29 -08:00