views:

21

answers:

1

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 hosting?

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

Thanks in advance! -Advait

+3  A: 
  1. About the cache requests with GET parameters:
    http://stackoverflow.com/questions/1590372/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.

Louis