Carlhuda
71c9337f45
All tests pass without memoizing view_context
2010-03-18 15:52:43 -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
David Heinemeier Hansson
5ddc597066
Use safe_concat instead of trying to html_safe! what might be a frozen string
2010-01-10 18:13:43 -08:00
David Heinemeier Hansson
5ea130943e
Fixed that fragment caching should return a cache hit as html_safe (or it would all just get escaped) [DHH]
2010-01-07 17:45:32 -08:00
José Valim
3990310a2b
Use underscore in notification namespaces.
2010-01-04 00:03:56 +01:00
José Valim
6fbe9ef2ff
Use namespaces in notifications.
2010-01-03 20:39:42 +01:00
José Valim
75ba102a80
Remove ActionView inline logging to ActiveSupport::Notifications and create ActionController::Base#log_event, so everything can be logged within one listener. Also expose log_process_action as a hook for different modules to include their own information during the action processing. This allow ActiveRecord to hook and any other ORM. Finally, this commit changes 'Processing' and 'Rendering' in logs to 'Processed' and 'Rendered' because at the point it's logged, everying already happened.
2009-12-26 20:28:53 +01:00
José Valim
2d7abe245e
Renamed Orchestra to Notifications once again [ #3321 state:resolved]
2009-10-15 18:51:51 -03:00
José Valim
af0d1fa892
Update Orchestra instrumentations and move part of logging to Orchestra.
2009-10-15 18:18:44 -03:00
José Valim
8b340ab2f6
Revert "Rename Orchestra to Notifications [ #3321 state:resolved]"
...
This reverts commit 8cbf825425
.
2009-10-15 18:06:15 -03:00
Joshua Peek
8cbf825425
Rename Orchestra to Notifications [ #3321 state:resolved]
2009-10-14 19:50:36 -05:00
José Valim
7cc1c2e71d
Add Orchestra instrumentation to fragment and page caching.
2009-09-20 10:56:38 -03:00
Yehuda Katz
efcfce50c4
Fixes "Cached fragment hit" written to log even if fragment is not cached (Erik Andrejko) [ #2917 state:resolved]
2009-08-08 12:46:44 -03:00
Pratik Naik
dbbae5e00e
Merge with docrails
2008-12-07 03:27:53 +01:00
Joshua Peek
20d6fdd256
write_fragment returns content if caching is disabled [ #846 state:resolved]
2008-11-22 13:19:11 -06:00
Pratik Naik
a5cdb7a813
Remove stuff that was deprecated in 2-1-stable
2008-10-21 11:34:56 +01:00
Pratik Naik
0432d15164
Merge with docrails.
2008-07-16 13:01:23 +01:00
Joshua Peek
aca246ab25
Get buffer for fragment cache from template's @output_buffer
2008-07-15 14:43:52 -05:00
Jeremy Kemper
69e72af622
Improve readability
2008-06-24 11:53:49 -07:00
José Valim
99860b72ae
Add fragment_exist? and exist? methods to cache stores. [ #203 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-19 10:38:59 +01:00
Jeremy Kemper
a8eb90fcee
Move fragment caching from special helper methods to TemplateHandler. Closes #10754 [Josh Peek]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8619 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-10 03:17:20 +00:00
David Heinemeier Hansson
2a9ad9ccbc
Moved the caching stores from ActionController::Caching::Fragments::* to ActiveSupport::Cache::*. If you're explicitly referring to a store, like ActionController::Caching::Fragments::MemoryStore, you need to update that reference with ActiveSupport::Cache::MemoryStore [DHH] Deprecated ActionController::Base.fragment_cache_store for ActionController::Base.cache_store [DHH] All fragment cache keys are now by default prefixed with the 'views/' namespace [DHH] Added ActiveRecord::Base.cache_key to make it easier to cache Active Records in combination with the new ActiveSupport::Cache::* libraries [DHH] Added ActiveSupport::Gzip.decompress/compress(source) as an easy wrapper for Zlib [Tobias Luetke] Included MemCache-Client to make the improved ActiveSupport::Cache::MemCacheStore work out of the box [Bob Cottrell, Eric Hodel] Added config.cache_store to environment options to control the default cache store (default is FileStore if tmp/cache is present, otherwise MemoryStore is used) [DHH]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8546 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-03 21:05:12 +00:00