I just decide to change django sources :)
middleware/caching.py:
 46     def process_request(self, request):
...
 51 #        if not request.method in ('GET', 'HEAD') or request.GET:
 52         if not request.method in ('GET', 'HEAD'):

utils/cache.py:
139 def _generate_cache_key(request, headerlist, key_prefix):
140     """Returns a cache key from the headers given in the header
list."""
141     ctx = md5.new()
142     for header in headerlist:
143         value = request.META.get(header, None)
144         if value is not None:
145             ctx.update(value)
#  add depependency on GET params to cache key
146     if request.GET:
147         ctx.update(str(sorted(request.GET.items())))
#
148     return 'views.decorators.cache.cache_page.%s.%s.%s' % (
149                key_prefix, iri_to_uri(request.path),
ctx.hexdigest())


On 11 Січ, 17:57, Alex Koshelev <[EMAIL PROTECTED]> wrote:
> You can write your own middleware that will be fit all your
> requirements
>
> On 11 янв, 16:45, sector119 <[EMAIL PROTECTED]> wrote:
>
> > Hi All!
>
> > In Django docs I read that the cache middleware caches every page that
> > _doesn't_ have GET or POST parameters.
> > But I want to cache pages which has GET parameters - some views which
> > data were _paginated_ and which urls have page=N GET parameters. How
> > can I do that?
>
> > Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to