[ Index ] |
PHP Cross Reference of phpBB-3.1.12-deutsch |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * 4 * This file is part of the phpBB Forum Software package. 5 * 6 * @copyright (c) phpBB Limited <https://www.phpbb.com> 7 * @license GNU General Public License, version 2 (GPL-2.0) 8 * 9 * For full copyright and license information, please see 10 * the docs/CREDITS.txt file. 11 * 12 */ 13 14 namespace phpbb\cache\driver; 15 16 /** 17 * ACM for APC 18 */ 19 class apc extends \phpbb\cache\driver\memory 20 { 21 var $extension = 'apc'; 22 23 /** 24 * {@inheritDoc} 25 */ 26 function purge() 27 { 28 apc_clear_cache('user'); 29 30 parent::purge(); 31 } 32 33 /** 34 * Fetch an item from the cache 35 * 36 * @access protected 37 * @param string $var Cache key 38 * @return mixed Cached data 39 */ 40 function _read($var) 41 { 42 return apc_fetch($this->key_prefix . $var); 43 } 44 45 /** 46 * Store data in the cache 47 * 48 * @access protected 49 * @param string $var Cache key 50 * @param mixed $data Data to store 51 * @param int $ttl Time-to-live of cached data 52 * @return bool True if the operation succeeded 53 */ 54 function _write($var, $data, $ttl = 2592000) 55 { 56 return apc_store($this->key_prefix . $var, $data, $ttl); 57 } 58 59 /** 60 * Remove an item from the cache 61 * 62 * @access protected 63 * @param string $var Cache key 64 * @return bool True if the operation succeeded 65 */ 66 function _delete($var) 67 { 68 return apc_delete($this->key_prefix . $var); 69 } 70 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Jan 11 00:25:41 2018 | Cross-referenced by PHPXref 0.7.1 |