PluginProbe
Depicter — Popup & Slider Builder / 1.9.2
Depicter — Popup & Slider Builder v1.9.2
4.8.1 trunk 1.0.0 1.1.0 1.1.2 1.1.4 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.3.0 1.3.1 1.3.2 1.3.3 1.3.5 1.3.8 1.5.0 1.5.1 1.5.2 1.5.5 1.6.0 1.6.1 1.6.2 1.7.0 All 76 releases
depicter / vendor / averta / wordpress / src / Cache / DatabaseCache.php

DatabaseCache.php in Depicter — Popup & Slider Builder 1.9.2, at vendor/averta/wordpress/src/Cache/DatabaseCache.php

56 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Averta\WordPress\Cache;
3
4
5 class DatabaseCache extends WPCache {
6
7 /**
8 * {@inheritDoc}
9 */
10 public function get( $key, $default = false ) {
11 global $_wp_using_ext_object_cache;
12
13 $current_using_cache = $_wp_using_ext_object_cache;
14 $_wp_using_ext_object_cache = false;
15
16 $result = parent::get( $key, $default );
17
18 $_wp_using_ext_object_cache = $current_using_cache;
19
20 return $result;
21 }
22
23 /**
24 * {@inheritDoc}
25 */
26 public function set( $key, $value, $ttl = null ): bool {
27 global $_wp_using_ext_object_cache;
28
29 $current_using_cache = $_wp_using_ext_object_cache;
30 $_wp_using_ext_object_cache = false;
31
32 $result = parent::set( $key, $value, $ttl );
33
34 $_wp_using_ext_object_cache = $current_using_cache;
35
36 return $result;
37 }
38
39 /**
40 * {@inheritDoc}
41 */
42 public function delete( $key ): bool {
43 global $_wp_using_ext_object_cache;
44
45 $current_using_cache = $_wp_using_ext_object_cache;
46 $_wp_using_ext_object_cache = false;
47
48 $result = parent::delete( $key );
49
50 $_wp_using_ext_object_cache = $current_using_cache;
51
52 return $result;
53 }
54
55 }
56