diff options
author | Dov Murik <dov.murik@gmail.com> | 2015-06-01 21:56:31 -0400 |
---|---|---|
committer | Dov Murik <dov.murik@gmail.com> | 2015-06-22 14:17:08 -0400 |
commit | d51e2eefd5c50cef366ddc96a3b93af0395755f1 (patch) | |
tree | 61d6475f706b28f7b25551a04ae6718ac5d5863c /activerecord/test/active_record | |
parent | ccdefa0e230dac72ae35e41791ec5fa53117e91e (diff) | |
download | rails-d51e2eefd5c50cef366ddc96a3b93af0395755f1.tar.gz rails-d51e2eefd5c50cef366ddc96a3b93af0395755f1.tar.bz2 rails-d51e2eefd5c50cef366ddc96a3b93af0395755f1.zip |
Improve detection of partial templates eligible for collection caching.
The regular expression which was used to detect partial templates that
begin with a `<% cache ... do %>` call missed some cases. This commits
attempts to improve the detection for some cases such as multi-line
comments at the beginning of the template. The different templates are
listed in two new unit test methods.
Note that specially crafted Ruby code can still evade such `cache`-call
detection: for example, a user might have its own method which itself
calls the Rails `cache` helper. In such a case, the template's code
doesn't start with a literal `cache` string and therefore will not be
eligible for collection caching.
Diffstat (limited to 'activerecord/test/active_record')
0 files changed, 0 insertions, 0 deletions