aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/helpers/cache_helper.rb
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #18948 from kaspth/automatic-collection-cachingRafael Mendonça França2015-02-251-0/+31
|\ | | | | Merge multi_fetch_fragments.
| * Collections automatically cache and fetch partials.Kasper Timm Hansen2015-02-211-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Collections can take advantage of `multi_read` if they render one template and their partials begin with a cache call. The cache call must correspond to either what the collections elements are rendered as, or match the inferred name of the partial. So with a notifications/_notification.html.erb template like: ```ruby <% cache notification %> <%# ... %> <% end %> ``` A collection would be able to use `multi_read` if rendered like: ```ruby <%= render @notifications %> <%= render partial: 'notifications/notification', collection: @notifications, as: :notification %> ```
| * Merge multi_fetch_fragments.Kasper Timm Hansen2015-02-201-0/+8
| | | | | | | | | | | | | | | | Makes caching a collection of template partials faster using `read_multi` on the Rails cache store. Some caching implementations have optimized `read_multi` so we don't have to check in the cache store for every template.
* | Fix cache_helper comment ERBAnthony Dmitriyev2015-02-201-2/+2
|/
* Change links to 37signals and svn blog to point to new destinations. [ci skip]Vipul A M2014-04-121-1/+1
|
* Digestor should just rely on the finder to know about the format and the ↵David Heinemeier Hansson2014-03-211-13/+3
| | | | variant -- trying to pass it back in makes a mess of things (oh, and doesnt work)
* Ensure LookupContext in Digestor selects correct variantPiotr Chmolowski2014-03-091-4/+14
| | | | | | | | | | Related to: #14242 #14243 14293 Variants passed to LookupContext#find() seem to be ignored, so I've used the setter instead: `finder.variants = [ variant ]`. I've also added some more test cases for variants. Hopefully this time passing tests will mean it actually works.
* Variants in ActionView::DigestorPiotr Chmolowski2014-03-041-1/+1
| | | | | | | | | | | Take variants into account when calculating template digests in ActionView::Digest. Digestor#digest now takes a hash as an argument to support variants and allow more flexibility in the future. Old-style arguments have been deprecated. Fixes #14242
* fix the typo [ci skip]Rajarshi Das2013-09-021-1/+1
| | | fix the typo newstopics => new topics in action view cache helper
* Refactor cache fragment handling with read/write methodsCarlos Antonio da Silva2013-06-251-6/+6
|
* Move the write portion of fragment_for to its own method to allow for easier ↵Andrew Rove2013-06-251-10/+14
| | | | creation of custom cache methods.
* Move actionpack/lib/action_view* into actionview/libPiotr Sarnacki2013-06-201-0/+196