// Retrieve the cached result if (false === ($result = apc_fetch('my_query_results'))) { // Execute the database query $result = $db->query('SELECT * FROM my_table'); // Cache the result apc_store('my_query_results', $result, 3600); // Caches the result for an hour } // Use the result for whatever purpose // ...Here, we are caching the result of a database query for an hour using the apc_store() function. If the result is not found in the cache, we execute the query and store the result in the cache for future use. PHP App cache is a part of the APC package library. APC (Alternative PHP Cache) provides opcode caching and user data caching for PHP.