开发者

Can I nest APC ( Alternative PHP Cache ) inside itself?

Just a quick simple question that I can not seem to find an answer for.

Can I nest APC cache inside another one?

For example, say I cache a page and I wanted it updated hourly, but I have a sidebar inside that page that I want updated every 24 hours.

Thanks!

edit: I am not asking how to do this, just if it is possible.开发者_开发技巧 Examples not required, unless it is a unique technique then how to normally use APC.


Short answer: NO.

Long answer: you might be able to do that, but you'd have to break the page into multiple sections, and cache each section independently, and when recomposing the final page to be sent to he user grab each section from its cache...


Yes, it's possible. Save the segments into separate APC variables via apc_store() and set their TTL (time to live) to 60*60 or 24*60*60, respectively.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜