Sorry Gabriel, I thought I was missing something and definitely I am. Lets see if I understant the process then.
But first, I will give you more background on the problem. I'm dealing with a double cache for the pages, in the way explained here: http://www.symfony-project.org/gentle-introduction/1_4/en/12-Caching (Listing 12-6) So... - I'm caching the full response, with template, for non authenticated users. - For the rest of user I use a Function cache, because the view is adapted to every logged user. Non authenticated users, reach this filter, and as far as I know, the cache is shown directly. Your solution is to tell apache to ignore the utm parameters before the request even goes to PHP, making a REWRITE (not a redirect as I understood before). This will probably work... so I will try it. Thanks! On Jul 5, 5:34 pm, pghoratiu <pghora...@gmail.com> wrote: > 1. no because the URL is cleaned up only internally (without doing a > redirect) > In the browser bar the URL will look like > this:http://example.com/post/13?utm_campaign=x&utm_medium=y > but what reaches the controller at the last line in the .htaccess file > should behttp://example.com/post/13 > So your Javascript code will pick up the right URL and the PHP code > the filtered URL. > > 2. I don't understand what you mean by that. > > gabriel > > On Jul 5, 5:53 pm, illarra <illa...@gmail.com> wrote: > > > > > Maybe I'm missing something, but: > > > 1) Cleans the URL and then shows the page, but then I lose all the > > analytics data: suppose I want to track a marketing campaign. > > 2) I'm using a template cache, so I can't specify a cache key. > > > Is there any other solution? > > > On Jul 5, 4:10 pm, pghoratiu <pghora...@gmail.com> wrote: > > > > You have 2 options: > > > 1. Change in mod_rewrite to filter out the extra query elements that > > > pollute the query string > > > 2. Set up explicitly the sf_cache_key when including a partial - in > > > your case tthe sf_cache_key would be the id. > > > > gabriel > > > > On Jul 5, 4:26 pm, illarra <illa...@gmail.com> wrote: > > > > > Hi > > > > > Is there a way of having an unique cache regardless of the extra > > > > parameters added to a route (like Google Analytics)? > > > > > Let's say I have a route @view?id=13 that results in the > > > > URLhttp://example.com/post/13 > > > > When I go to the > > > > URLhttp://example.com/post/13?utm_campaign=x&utm_medium=y > > > > the cached route by symfony is: @view? > > > > id=13&utm_campaign=x&utm_medium=y > > > > > And that creates different entries in the cache for the very same > > > > page, because this parameters are just used via javascript. > > > > I would like only one cache per view: @view?id=13. Can I change this > > > > behavior? > > > > > Thanks a lot. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en