Thanks for patch, but would you mind submitting it to the Rails Trac?
It''d probably get better visibility there as a patch.
See http://dev.rubyonrails.org/wiki/ for more info.
On Dec 9, 6:04 pm, fmardini <f.mard...@gmail.com>
wrote:> Hi,
>
> I am using the file system store, and I need to expire entire folders
> on certain actions (i am trying to avoid the regexp key), but this is
> not supported.
> Below is my patch
>
> Index: actionpack/lib/action_controller/caching.rb
> ==================================================================> ---
actionpack/lib/action_controller/caching.rb (revision 8339)
> +++ actionpack/lib/action_controller/caching.rb (working copy)
> @@ -529,7 +529,7 @@
> end
>
> def delete(name, options) #:nodoc:
> - File.delete(real_file_path(name))
> + FileUtils.rm_rf(real_file_path(name))
> rescue SystemCallError => e
> # If there''s no cache, then there''s nothing to
complain
> about
> end
> @@ -548,7 +548,7 @@
>
> private
> def real_file_path(name)
> - ''%s/%s.cache'' % [@cache_path,
name.gsub(''?'',
> ''.'').gsub('':'', ''.'')]
> + "%s/%s#{name.ends_with?(''/'') ?
'''' : ''.cache''}" %
> [@cache_path, name.gsub(''?'',
''.'').gsub('':'', ''.'')]
> end
>
> def ensure_cache_path(path)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Core" group.
To post to this group, send email to rubyonrails-core@googlegroups.com
To unsubscribe from this group, send email to
rubyonrails-core-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---