开发者

Cache a Django view with GET parameters on a shared server

I'm developing a Django application on a shared server (Dreamhost).

A view that I'm implementing takes several HTTP GET parameters to perform database lookups and return serialized data. Some of these lookups generate several hundreds of kilobytes of data that is expensive to compute. Caching this data would be ideal as it would save both DB access and computation time. I have two questions:

  1. The Django documentation mentions that the cache middleware doesn't cache requests with GET or POST parameters. Is there any way around this?
  2. The Dreamhost wiki indicates that either Filesystem caching or Database caching are best suited for Dreamhost sites. Which of these will be better in terms of performance, setup, and maintainability. Are there any alternatives for shared hosti开发者_JS百科ng?

I'm also open to suggestions for other solutions to my problem.

Thanks in advance! -Advait


  1. About the cache requests with GET parameters:
    Cache a django view that has URL parameters

  2. Filesystem caching is usually fast enough, easy to setup, and maintenance is same as managing any directory. Delete the cache by removing the files in the cache directory.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜