Caching data in PHP

前端 未结 4 1788
我在风中等你
我在风中等你 2021-02-09 03:05

I\'m developing a site in PHP which has some complex SQL queries and I would like to implement a caching feature to reduce the load on the database.

I\'m just wonderin

4条回答
  •  半阙折子戏
    2021-02-09 03:48

    You can implement caching on multiple places in your application:

    • you can implement conditional GET (ETag and Last-Modified HTTP headers)
    • do data caching with the mentioned solutions (Cache_Lite, Zend_Cache, APC) with multiple backends (file, memcached, shared memory)
    • you can cache the template files as you said (Smarty)

提交回复
热议问题