PluginProbe
Polylang / 3.1.4
Polylang v3.1.4
3.8.9 3.8.8 3.8.7 3.8.6 3.8.5 3.8.4 3.8.3 2.7 2.7.0.1 2.7.1 2.7.2 2.7.3 2.7.4 2.8 2.8.1 2.8.2 2.8.3 2.8.4 2.9 2.9.1 2.9.2 3.0 3.0.1 3.0.2 3.0.3 All 233 releases
← All changes | include/cache.php +16 -1 2.83.1.4 View file →
@@ -9,11 +9,23 @@
9 9 *
10 10 * @since 1.7
11 11 */
12 12 class PLL_Cache {
13 - protected $blog_id, $cache;
13 + /**
14 + * Current site id.
15 + *
16 + * @var int
17 + */
18 + protected $blog_id;
14 19
15 20 /**
21 + * The cache container.
22 + *
23 + * @var array
24 + */
25 + protected $cache;
26 +
27 + /**
16 28 * Constructor
17 29 *
18 30 * @since 1.7
19 31 */
@@ -27,8 +39,9 @@
27 39 *
28 40 * @since 1.7
29 41 *
30 42 * @param int $new_blog
43 + * @return void
31 44 */
32 45 public function switch_blog( $new_blog ) {
33 46 $this->blog_id = $new_blog;
34 47 }
@@ -39,8 +52,9 @@
39 52 * @since 1.7
40 53 *
41 54 * @param string $key
42 55 * @param mixed $data
56 + * @return void
43 57 */
44 58 public function set( $key, $data ) {
45 59 $this->cache[ $this->blog_id ][ $key ] = $data;
46 60 }
@@ -62,8 +76,9 @@
62 76 *
63 77 * @since 1.7
64 78 *
65 79 * @param string $key
80 + * @return void
66 81 */
67 82 public function clean( $key = '' ) {
68 83 if ( empty( $key ) ) {
69 84 unset( $this->cache[ $this->blog_id ] );