-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcache-user-query.php
More file actions
35 lines (27 loc) · 893 Bytes
/
cache-user-query.php
File metadata and controls
35 lines (27 loc) · 893 Bytes
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
<?php
/**
* Plugin Name: Cache User Query
* Description: MU-Plugin to cache user query. Useful on sites with big number of users.
* Version: 1.1
* Author: KAGG Design
* Author URI: https://kagg.eu/en
* License: GPL2
* Requires at least: 4.4
* Tested up to: 5.4
* Requires PHP: 5.6
*
* @package kagg\cache-user-query
*/
namespace KAGG\CacheUserQuery;
define( 'KAGG_CACHE_USER_QUERY', dirname( __FILE__ ) . '/cache-user-query' );
require_once KAGG_CACHE_USER_QUERY . '/vendor/autoload.php';
$cache_user_query_plugin = new Cache_User_Query();
$cache_user_query_plugin->add_hooks();
define( 'KAGG_CACHE_USER_QUERY_GENERATE_USERS', false );
if ( KAGG_CACHE_USER_QUERY_GENERATE_USERS ) {
( new Generate_Users() )->generate( 250 * 1000 );
}
define( 'KAGG_CACHE_USER_QUERY_DELETE_USERS', false );
if ( KAGG_CACHE_USER_QUERY_DELETE_USERS ) {
( new Generate_Users() )->delete();
}