You can hit the counter through ajax and still keep the cache of the entire page. This is useful if you have a cache through nginx + memcached.
Regards, On 7 fev, 20:15, "Henrik Genssen" <[email protected]> wrote: > are you using middleware or a decorator for caching your view? > if you are using a decorator like @cache_page from > django.views.decorators.cache you can add simply a second decorator befor the > caching one, where you count your hits... > if you are using a middleware, you have to write your own cache middleware > (copy the existing and add you counter) > > regards > > Hinnack > > >reply to message: > >date: 07.02.2011 22:53:10 > >from: "ozgur yilmaz" <[email protected]> > >to: [email protected] > >subject: Re: incrementing counter of an cached data > > >No suggest? > > >2011/2/7 ozgur yilmaz <[email protected]> > > >> Hi, > > >> I'm using file caching. But need to increment a field for storing product > >> hits. Is there an optimal way to do this? > > >> Thanks, > > >-- > >You received this message because you are subscribed to the Google Groups > >"Django users" group. > >To post to this group, send email to [email protected]. > >To unsubscribe from this group, send email to > >[email protected]. > >For more options, visit this group > >athttp://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

