开发者

php How to cache from web search for a pagination?

One moment ago, I visted http://www.123people.com, I am intersting in some technology from it.

After a web photo search. how to cache the data then for a pagination? In the raw code, I haven't see he load all the data in the page then make a jquery pagination with div show, hidden.

And I do not think, store into database is a good way.

Except these, How to cache 开发者_运维问答from web search for a pagination?(A wise way, pay less server resource.)


They can for example cache results as search "pages" [for example as files on hard drive], returning only information about current page and number of pages in collection. If data can change dynamically, they may store all the results in one place, and then "query" it for a specific subset of that data.

You have really many options to do that and probably quite much of them will be good / suffcicient.

Resources:

http://planetcakephp.org/aggregator/items/4559-pagination-caching-with-cakephp

http://www.web-design-talk.co.uk/210/php-paging-with-caching/

http://www.jotlab.com/2010/02/09/pagination-caching-with-cakephp/

http://stefanomanfredini.info/2010/09/single-query-cache-and-pagination-cache-until-a-future-post-and-ad-hoc-joins-an-over-override-of-appmodelfind/

google: php pagination cache

http://www.kattz.com/programming/20652-php-pagination-how-do-chnage-my-pagination-page-produce-static-pages-so-there-less-load-mysql-table.html

Apparently there are many resources with CakePHP in mind - I don't use it, but they'll show you the idea.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜