|
|
|
[
Permlink
| « Hide
]
Andres March - [14/Jan/05 07:24 PM ]
Would you like to submit a patch?
sorry, I couldn't came up with a patch for this. Currently I take care to avoid such situations :-(
Maybe implementation:
1. check if a special request attribute "__OSCACHE_FILTERED" exists 2. if true then only invoke chain.doFilter(request, response); 3. if false then set the special request attribute and then run the existing code 1.
Add new boolean parameter "OncePerRequest" to the ServletFilter configuration part in web.xml. The default value is "false", so backwards compatibility isn't broken. 2. Document parameter in http://wiki.opensymphony.com/display/CACHE/CacheFilter I don't think that the default should be 'false' for the flag. Even in old applications I can't see any reason to continue generating deadlocks.
The only problem could be with request attribute name conflict with existing attributes, which il really unlike if you choose a very specific name (e.g.: "_oscache_filter_multipass_once"). If nobody will comment an use case for calling CacheFilter more than once in a request here, we havn't to provide a OncePerRequest parameter. Instead CacheFilter will be called only once per request always.
Since nobody added a use case (set oncePerRequest to false), the filter will be performed only once per request.
| ||||||||||||||||||||||||||||||||||||||||||||||