PluginProbe
SweepPress: Website Cleanup and Optimization / 2.0
SweepPress: Website Cleanup and Optimization v2.0
trunk 1.1 1.2 1.3 1.4 1.4.1 1.5 1.6 1.7 1.8 2.0 2.1 2.1.1 2.2 2.3 2.3.1 2.4 2.4.1 2.4.2 2.5 2.6 3.0 3.1 3.1.1 3.2 All 39 releases
sweeppress / core / base / Query.php

Query.php in SweepPress: Website Cleanup and Optimization 2.0, at core/base/Query.php

29 lines 582 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Dev4Press\Plugin\SweepPress\Base;
4
5 use Dev4Press\Plugin\SweepPress\Basic\Cache;
6
7 if ( ! defined( 'ABSPATH' ) ) {
8 exit;
9 }
10
11 abstract class Query {
12 protected $_group = '';
13
14 public function __construct() {
15
16 }
17
18 protected function retrieve( string $name ) {
19 return Cache::instance()->get( $this->_group, $name );
20 }
21
22 protected function store( string $name, array $data ) {
23 Cache::instance()->add( $this->_group, $name, $data );
24 }
25
26 protected function clear( string $name ) {
27 Cache::instance()->delete( $this->_group, $name );
28 }
29 }