Re: how to manually invlaid a cached view?

2006-06-27 Thread Wei Litao
No, I can't invalidate the view cache. it looks that if directly use cache.set to store a cache. only one file would stored in file system(soppose using file based cache), but use @cache_page, there would be two file, one for header and another for content.
On 6/27/06, Jay Parlar <[EMAIL PROTECTED]> wrote:
On 6/26/06, Wei Litao <[EMAIL PROTECTED]> wrote:> I have checked the cache document, it said that an view can have an> @cache_page(60 * 15) decorator to store it on a cache, But it didn't say how
> to fluch it. Is there some api to invalid a view cache manually? I want to> invalid some view cache when calling another view.Check the part of the cache document entitled "Low-level API"
(http://www.djangoproject.com/documentation/cache/#the-low-level-cache-api)It looks like you can just import the 'cache' object, and call
'delete', passing in the URL you want to invalidate.Warning: I've not actually used the cache framework yet, so I might be wrong.Jay P.-- Sincerely,Wei Litao

--~--~-~--~~~---~--~~
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  -~--~~~~--~~--~--~---


Re: how to manually invlaid a cached view?

2006-06-26 Thread Jay Parlar

On 6/26/06, Wei Litao <[EMAIL PROTECTED]> wrote:
> I have checked the cache document, it said that an view can have an
> @cache_page(60 * 15) decorator to store it on a cache, But it didn't say how
> to fluch it. Is there some api to invalid a view cache manually? I want to
> invalid some view cache when calling another view.


Check the part of the cache document entitled "Low-level API"
(http://www.djangoproject.com/documentation/cache/#the-low-level-cache-api)

It looks like you can just import the 'cache' object, and call
'delete', passing in the URL you want to invalidate.

Warning: I've not actually used the cache framework yet, so I might be wrong.

Jay P.

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---