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

wincache.php

Zuletzt modifiziert: 09.10.2024, 12:54 - Dateigröße: 1.35 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 WinCache
18  */
19  class wincache extends \phpbb\cache\driver\memory
20  {
21      var $extension = 'wincache';
22   
23      /**
24      * {@inheritDoc}
25      */
26      function purge()
27      {
28          wincache_ucache_clear();
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          $success = false;
43          $result = wincache_ucache_get($this->key_prefix . $var, $success);
44   
45          return ($success) ? $result : false;
46      }
47   
48      /**
49      * Store data in the cache
50      *
51      * @access protected
52      * @param string $var Cache key
53      * @param mixed $data Data to store
54      * @param int $ttl Time-to-live of cached data
55      * @return bool True if the operation succeeded
56      */
57      function _write($var, $data, $ttl = 2592000)
58      {
59          return wincache_ucache_set($this->key_prefix . $var, $data, $ttl);
60      }
61   
62      /**
63      * Remove an item from the cache
64      *
65      * @access protected
66      * @param string $var Cache key
67      * @return bool True if the operation succeeded
68      */
69      function _delete($var)
70      {
71          return wincache_ucache_delete($this->key_prefix . $var);
72      }
73  }
74