Caching in Core PHP?

General discussion on PHP
Post Reply
Posts: 15
Joined: Fri Jul 15, 2016 10:02 am

Caching in Core PHP?

Post by ashi4275 » Mon Oct 24, 2016 11:16 am

Hello friends,
My issue is: "How can we do caching in Core PHP?" I hope any tech developer may help me in resolving this issue.

User avatar
Zend Global Support
Posts: 997
Joined: Sun Dec 14, 2008 9:48 am

Re: Caching in Core PHP?

Post by zvika » Wed Oct 26, 2016 9:05 am

Caching is an external entity in PHP, since its not sharing anything between processes.
You can create a disk based caching mechanism by dropping data into writable directory and based on some rules (timestamp etc.) you can fetch the data instead of running the code logic if valid, or generate new data if invalid, for consequent requests.
PHP extensions and backends are available to provide caching mechanism, popular ones are APC, WinCache (Windows only), Memcache/MemcacheD, Zend Data Cache and more.
There is also an option to cache in database with fast connection, if you have an app which requires the DB constantly, but it would be less performant than caching extensions and backends.
Zvika Dror
Zend Support Team

Post Reply