-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathsqlite-object-cache.php
More file actions
56 lines (50 loc) · 1.61 KB
/
sqlite-object-cache.php
File metadata and controls
56 lines (50 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
/**
* Plugin Name: SQLite Object Cache
* Version: 1.6.4
* Plugin URI: https://github.com/OllieJones/sqlite-object-cache
* Description: A persistent object cache backend powered by SQLite3.
* Author: Oliver Jones
* Author URI: https://github.com/OllieJones/
* Requires at least: 5.5
* Requires PHP: 5.6
* Tested up to: 7.0
* Text Domain: sqlite-object-cache
* Domain Path: /languages/
* License: GPLv2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
*
* @package SQLiteObjectCache
* @author Oliver Jones
* @since 0.1.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
require_once 'includes/class-sqlite-object-cache.php';
/* wp-cli interface activation */
if ( defined( 'WP_CLI' ) && WP_CLI ) {
require_once( plugin_dir_path( __FILE__ ) . 'includes/cli.php' );
}
if ( is_admin() || ( defined( 'WP_CLI' ) && WP_CLI ) ) {
require_once 'includes/class-sqlite-object-cache-settings.php';
require_once 'includes/lib/class-sqlite-object-cache-statistics.php';
require_once 'includes/lib/class-sqlite-backup-exclusion.php';
require_once 'includes/lib/class-file.php';
/* Skip the opcache size test. */
// require_once 'includes/lib/class-sqlite-object-cache-opcache.php';
}
/**
* Returns the main instance of SQLite_Object_Cache to prevent the need to use globals.
*
* @return object SQLite_Object_Cache
* @since 1.0.0
*/
function sqlite_object_cache() {
$instance = new SQLite_Object_Cache( __FILE__, '1.6.4' );
if ( is_admin() ) {
$instance->settings = new SQLite_Object_Cache_Settings( $instance, plugin_basename( __FILE__ ));
}
return $instance;
}
sqlite_object_cache();