Verzeichnisstruktur phpBB-3.2.0


Veröffentlicht
06.01.2017

So funktioniert es


Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück

Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

(Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

apc.php

Zuletzt modifiziert: 09.10.2024, 12:54 - Dateigröße: 1.23 KiB


01  <?php
02  /**
03  *
04  * This file is part of the phpBB Forum Software package.
05  *
06  * @copyright (c) phpBB Limited <https://www.phpbb.com>
07  * @license GNU General Public License, version 2 (GPL-2.0)
08  *
09  * 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  }
71