1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

18 commits

Author SHA1 Message Date
Piotr Sarnacki
0d6e8edc2a Move actionpack/lib/action_view* into actionview/lib 2013-06-20 17:23:15 +02:00
Rafael Mendonça França
faa2c71dee Revert "Merge pull request #10337 from eimermusic/fix_template_digestor_lookup"
This reverts commit b4239622af, reversing
changes made to f99ce3c188.

Reason: This broke the build
https://travis-ci.org/rails/rails/jobs/6629894
2013-04-25 11:14:22 -03:00
Martin Westin
9a79c13c45 AV Digestor correctly passes format to LookupContext
ActionView::Digestor now passes arguments correctly to
LookupContext::find method. This makes cache digests
respect the format option correctly.

FixtureFinder in tests also changed to reflect this.
2013-04-25 09:52:04 +02:00
Daniel Schierbeck
889bf19857 Extract dependency tracking from Digestor 2013-02-20 16:17:55 +01:00
Jamis Buck
70e684a681 view_cache_dependency API
A declarative API for specifying dependencies that affect template
cache digest computation. In your controller, specify any of said
dependencies:

  view_cache_dependency { "phone" if using_phone? }

When the block is evaluated, the resulting value is included in the
cache digest calculation, allowing you to generate different digests
for effectively the same template. (Mostly useful if you're mucking
with template load paths.)
2013-01-08 11:20:47 -07:00
Brian Alexander
749a745264 Digestor explicit dependency should not contain trailing whitespace
test for rails/rails#8586
2012-12-21 18:00:51 -07:00
thedarkone
45448a5788 Replace some global Hash usages with the new thread safe cache.
Summary of the changes:
 * Add thread_safe gem.
 * Use thread safe cache for digestor caching.
 * Replace manual synchronization with ThreadSafe::Cache in Relation::Delegation.
 * Replace @attribute_method_matchers_cache Hash with ThreadSafe::Cache.
 * Use TS::Cache to avoid the synchronisation overhead on listener retrieval.
 * Replace synchronisation with TS::Cache usage.
 * Use a preallocated array for performance/memory reasons.
 * Update the controllers cache to the new AS::Dependencies::ClassCache API.
   The original @controllers cache no longer makes much sense after @tenderlove's
   changes in 7b6bfe84f3 and f345e2380c.
 * Use TS::Cache in the connection pool to avoid locking overhead.
 * Use TS::Cache in ConnectionHandler.
2012-12-14 12:18:47 +01:00
Aaron Patterson
01149dd4f9 fix Digestor to be thread safe.
Add a lock on the cache so that we don't have concurrency issues when
calculating the cache.
2012-10-17 15:20:51 -07:00
Andy Shipman
2938ef7a65 Allow for deep directory path for view templates. 2012-10-11 17:36:58 +01:00
Rafael Mendonça França
1c8539da47 Define just the cattr_reader.
This will trim down the API and avoid some error that can be made
changing the cache object.
2012-09-05 14:38:16 -03:00
Rafael Mendonça França
d8dee214e3 Use the same logger that ActionView::Base for the Digestor 2012-09-05 13:51:24 -03:00
Rafael Mendonça França
a227359c62 Remove unneeded requires
We should not require all the core extensions inside the frameworks.
The logger is already defined in the Action View framework.
2012-09-05 11:07:25 -03:00
David Heinemeier Hansson
a497bed113 We dont need to include the name and the format in the digest -- source is authoritative enough 2012-09-04 17:29:00 -05:00
Christos Zisopoulos
e7c23a4a7a Further improve RENDER_DEPENDENCY regexp comments 2012-08-30 14:27:07 +02:00
Christos Zisopoulos
979d327e1e Improve RENDER_DEPENDENCY regexp comment to keep the doc editor happy. 2012-08-30 14:17:03 +02:00
Christos Zisopoulos
17f2499f04 Digestor can now parse old style hash syntax for render 2012-08-30 13:13:47 +02:00
Christos Zisopoulos
21bad7445b Digestor ignores most whitespace when parsing render invocations 2012-08-30 13:01:25 +02:00
David Heinemeier Hansson
502d5e24e2 Add automatic template digests to all CacheHelper#cache calls (originally spiked in the cache_digests plugin) *DHH* 2012-08-29 14:23:56 -05:00