开发者

Best way to count view when 1 page is cached in cakePHP

I want ask best way to count view when 1 page 开发者_如何学Cis cached in cakePHP.

When a page is cached , I use javascript send request to server to + view for post. But i think it cause server is overload.


Mike Han's response is incorrect. Cached pages in Cake also bypass app_controller. you will need to do an ajax call from the cached page to some action which increments your view-count database field.


I suspect controller is still in action though the view is cached. Or at least beforeFilter of app controller may still be working. You could do the count there.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜