benlau / gogogohk

Automatically exported from code.google.com/p/gogogohk
0 stars 0 forks source link

Enable html page and ajax call caching #48

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
HTTP headers like expires and last modified was not set , and therefore
most of the page was not cached. Please enable html page and ajax call caching.

Original issue reported on code.google.com by xben...@gmail.com on 13 Sep 2009 at 10:06

GoogleCodeExporter commented 9 years ago
May try django decorator ...

Method 1 - http://docs.djangoproject.com/en/dev/topics/cache/#using-vary-headers
Method 2 -
http://docs.djangoproject.com/en/dev/topics/cache/#controlling-cache-using-other
-headers

Original comment by mr.ksc...@gmail.com on 13 Sep 2009 at 12:26

GoogleCodeExporter commented 9 years ago
After a day or so googling ... performing cache prevention is MUCH easier than 
the
other way round.

Thus.... applying site-wide caching with
http://docs.djangoproject.com/en/dev/topics/cache/#the-per-site-cache and then
specifying which function won't cache is much an easier task.

Original comment by mr.ksc...@gmail.com on 15 Sep 2009 at 3:27

GoogleCodeExporter commented 9 years ago
Cache Middleware is not working well with i18n in current django version ... and
app-engine-patch is even somehow lag behind a bit than the django release....

IRC friendly give me this..

per-view caching and i18n is occasionally broken, the patch hasn't been 
committed,
GAE isn't new enough to take advantage of it anyway, and you're probably 
prematurely
optimizing.

Original comment by mr.ksc...@gmail.com on 21 Sep 2009 at 4:12

GoogleCodeExporter commented 9 years ago
cache middleware and i18n ticket - http://code.djangoproject.com/ticket/5691

Another resort is to find ways to cache in-browser using http.

Original comment by mr.ksc...@gmail.com on 21 Sep 2009 at 4:15