From 16bf2fe107d9934ed3ed6ca9881cf73b83796e69 Mon Sep 17 00:00:00 2001 From: emrikol Date: Fri, 23 Jun 2017 04:56:14 +0000 Subject: [PATCH 1/6] Bugfix: Renaming plugin header in helper files --- focus.php | 2 +- includes/admin-page.php | 4 ++-- includes/object-cache.php | 4 ++-- readme.txt | 7 +++++-- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/focus.php b/focus.php index ce0d0dd..ab21941 100644 --- a/focus.php +++ b/focus.php @@ -2,7 +2,7 @@ /** * Plugin Name: FOCUS Object Cache * Plugin URI: http://wordpress.org/plugins/focus-object-cache/ - * Description: A File-based Object Cache that is Utterly Slow. Persistenly caches WP_Cache objects in the file system. Can really help speed up a site that has fast disk access and slow database access. + * Description: File-based Object Cache is Utterly Slow: An Object Caching Dropin for WordPress that uses the local file system. * Version: 1.0.0 * Text Domain: focus-cache * Author: Derrick Tennant diff --git a/includes/admin-page.php b/includes/admin-page.php index 76441e4..dd41fa3 100644 --- a/includes/admin-page.php +++ b/includes/admin-page.php @@ -1,8 +1,8 @@ Date: Fri, 23 Jun 2017 05:03:04 +0000 Subject: [PATCH 2/6] Readme updates --- focus.php | 1 + readme.md | 18 +++++++++++++----- readme.txt | 4 +++- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/focus.php b/focus.php index ab21941..bd4e1a8 100644 --- a/focus.php +++ b/focus.php @@ -10,6 +10,7 @@ * GitHub Plugin URI: https://github.com/emrikol/focus/ * License: GPLv3 * License URI: http://www.gnu.org/licenses/gpl-3.0.html + * Network: true * * @package WordPress */ diff --git a/readme.md b/readme.md index 19d80a7..40d4bb8 100644 --- a/readme.md +++ b/readme.md @@ -1,6 +1,6 @@ # FOCUS Cache -**Donate link:** http://wordpressfoundation.org/donate/ **Contributors:** emrikol +**Donate link:** http://wordpressfoundation.org/donate/ **Tags:** cache, caching **Requires at least:** 4.3.11 **Tested up to:** 4.8 @@ -8,11 +8,10 @@ **License:** GPLv2 or later **License URI:** http://www.gnu.org/licenses/gpl-2.0.html -File-based Object Cache is Utterly Slow: An Object Caching Dropin for WordPress that uses the local file system +File-based Object Cache is Utterly Slow: An Object Caching Dropin for WordPress that uses the local file system. ## Description -[![Build Status](https://travis-ci.org/emrikol/focus.svg?branch=master)](https://travis-ci.org/emrikol/focus) I needed a persistent object cache while doing work on a budget hosting provider. A lot of the other file-based caching plugins were either bundled with other things I didn't need (W3 Total Cache), or were old and broken. @@ -23,10 +22,19 @@ I've been heavily influenced by [redis-cache](https://wordpress.org/plugins/redi ## Installation -Install `object-cache.php` to `wp-content/object-cache.php` with a symlink, by copying the file, or via the settings page in the Tools menu. +Install like any other plugin, directly from your plugins page or manually by copying the files to the `plugins/` folder. Go to the plugin settings page at Settings->FOCUS Cache and click `Enable Object Cache`. + ## Changelog + +### 1.0.1 + +* Bugfix: Plugin was unable to be activated in the "Add Plugins" page. This was due to the fact that WordPress detected the wrong PHP file as the plugin and tried to activate it. Renaming the "Plugin Name" header from the PHP files in the `includes/` directory resolved the issue. Thanks to @ramonjosegn on the WordPress.org Support Forums for bringing this to my attention. +* Bugfix: The plugin is now required to be activated across all sites in a multisite installation. +* Readme updates. + + ### 1.0.0 -First Version \ No newline at end of file +First Version diff --git a/readme.txt b/readme.txt index ccb1f90..9ccf01b 100644 --- a/readme.txt +++ b/readme.txt @@ -20,13 +20,15 @@ I've been heavily influenced by [redis-cache](https://wordpress.org/plugins/redi == Installation == -Install `object-cache.php` to `wp-content/object-cache.php` with a symlink, by copying the file, or via the settings page in the Tools menu. +Install like any other plugin, directly from your plugins page or manually by copying the files to the `plugins/` folder. Go to the plugin settings page at Settings->FOCUS Cache and click `Enable Object Cache`. == Changelog == = 1.0.1 = * Bugfix: Plugin was unable to be activated in the "Add Plugins" page. This was due to the fact that WordPress detected the wrong PHP file as the plugin and tried to activate it. Renaming the "Plugin Name" header from the PHP files in the `includes/` directory resolved the issue. Thanks to @ramonjosegn on the WordPress.org Support Forums for bringing this to my attention. +* Bugfix: The plugin is now required to be activated across all sites in a multisite installation. +* Readme updates. = 1.0.0 = From 0779a08862f8a57e42471f16a82756f5b41865c5 Mon Sep 17 00:00:00 2001 From: emrikol Date: Fri, 23 Jun 2017 05:06:40 +0000 Subject: [PATCH 3/6] Readme updates --- focus.php | 2 +- includes/admin-page.php | 2 +- readme.md | 8 ++++++++ readme.txt | 8 +++++++- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/focus.php b/focus.php index bd4e1a8..5ae8081 100644 --- a/focus.php +++ b/focus.php @@ -3,7 +3,7 @@ * Plugin Name: FOCUS Object Cache * Plugin URI: http://wordpress.org/plugins/focus-object-cache/ * Description: File-based Object Cache is Utterly Slow: An Object Caching Dropin for WordPress that uses the local file system. - * Version: 1.0.0 + * Version: 1.0.1 * Text Domain: focus-cache * Author: Derrick Tennant * Author URI: https://emrikol.com/ diff --git a/includes/admin-page.php b/includes/admin-page.php index dd41fa3..0bf747c 100644 --- a/includes/admin-page.php +++ b/includes/admin-page.php @@ -3,7 +3,7 @@ * Name: FOCUS Object Cache * Plugin URI: http://wordpress.org/plugins/focus-object-cache/ * Description: File-based Object Cache is Utterly Slow: An Object Caching Dropin for WordPress that uses the local file system. - * Version: 1.0.0 + * Version: 1.0.1 * Text Domain: focus-cache * Author: Derrick Tennant * Author URI: https://emrikol.com/ diff --git a/readme.md b/readme.md index 40d4bb8..75d3a5e 100644 --- a/readme.md +++ b/readme.md @@ -38,3 +38,11 @@ Install like any other plugin, directly from your plugins page or manually by co ### 1.0.0 First Version + + +## Upgrade Notice + + +### 1.0.1 + +The plugin can now be properly activated via the "Add Plugins" screen. diff --git a/readme.txt b/readme.txt index 9ccf01b..5d257ec 100644 --- a/readme.txt +++ b/readme.txt @@ -32,4 +32,10 @@ Install like any other plugin, directly from your plugins page or manually by co = 1.0.0 = -First Version \ No newline at end of file +First Version + +== Upgrade Notice == + += 1.0.1 = + +The plugin can now be properly activated via the "Add Plugins" screen. \ No newline at end of file From 709409070e902813830ef970d91b0b26f7f5bfb7 Mon Sep 17 00:00:00 2001 From: emrikol Date: Fri, 23 Jun 2017 05:07:45 +0000 Subject: [PATCH 4/6] Readme updates --- readme.md | 2 ++ readme.txt | 2 ++ 2 files changed, 4 insertions(+) diff --git a/readme.md b/readme.md index 75d3a5e..674e175 100644 --- a/readme.md +++ b/readme.md @@ -13,6 +13,8 @@ File-based Object Cache is Utterly Slow: An Object Caching Dropin for WordPress ## Description +[![Build Status](https://travis-ci.org/emrikol/focus.svg?branch=master)](https://travis-ci.org/emrikol/focus) + I needed a persistent object cache while doing work on a budget hosting provider. A lot of the other file-based caching plugins were either bundled with other things I didn't need (W3 Total Cache), or were old and broken. On the sites I've tested this with, that have slow database servers, I have noticed an increase in page generation times of about 2x. On the other hand, for sites that have fast database servers it can actually _increase_ page generation time. Whenever possible, I'd recommend using Memcached, Redis, or your other quality cache of choice. diff --git a/readme.txt b/readme.txt index 5d257ec..f5bcdf1 100644 --- a/readme.txt +++ b/readme.txt @@ -12,6 +12,8 @@ File-based Object Cache is Utterly Slow: An Object Caching Dropin for WordPress == Description == +[![Build Status](https://travis-ci.org/emrikol/focus.svg?branch=master)](https://travis-ci.org/emrikol/focus) + I needed a persistent object cache while doing work on a budget hosting provider. A lot of the other file-based caching plugins were either bundled with other things I didn't need (W3 Total Cache), or were old and broken. On the sites I've tested this with, that have slow database servers, I have noticed an increase in page generation times of about 2x. On the other hand, for sites that have fast database servers it can actually _increase_ page generation time. Whenever possible, I'd recommend using Memcached, Redis, or your other quality cache of choice. From d4628747887c6f04c962db980755f2f2f3d31a6a Mon Sep 17 00:00:00 2001 From: emrikol Date: Fri, 23 Jun 2017 05:54:08 +0000 Subject: [PATCH 5/6] Grunting --- .gitignore | 1 + Gruntfile.js | 105 ++ package.json | 27 + readme.txt | 2 +- release/1.0.1/LICENSE | 674 +++++++++++++ release/1.0.1/focus.php | 407 ++++++++ release/1.0.1/includes/admin-page.php | 66 ++ release/1.0.1/includes/object-cache.php | 1196 +++++++++++++++++++++++ release/1.0.1/readme.txt | 41 + release/focus-object-cache-v1.0.1.zip | Bin 0 -> 29349 bytes 10 files changed, 2518 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 Gruntfile.js create mode 100644 package.json create mode 100644 release/1.0.1/LICENSE create mode 100644 release/1.0.1/focus.php create mode 100644 release/1.0.1/includes/admin-page.php create mode 100644 release/1.0.1/includes/object-cache.php create mode 100644 release/1.0.1/readme.txt create mode 100644 release/focus-object-cache-v1.0.1.zip diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bca51b3 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules/ diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000..be8c3e8 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,105 @@ +module.exports = function( grunt ) { + grunt.initConfig( { + pkg: grunt.file.readJSON( 'package.json' ), + + shell: { + target: { + command: 'wp2md convert readme.txt > readme.md' + } + }, + + version: { + readme: { + options: { + prefix: 'Stable tag:\\s*' + }, + src: ['readme.txt'] + }, + scss: { + options: { + prefix: 'Version:\\s*' + }, + src: ['scss/style.scss'] + }, + package: { + src: ['package.json'] + } + }, + + clean: { + main: ['release/<%= pkg.version %>'] + }, + + copy: { + main: { + src: [ + 'focus.php', + 'LICENSE', + 'readme.txt', + 'includes/**' + ], + dest: 'release/<%= pkg.version %>/' + } + }, + + compress: { + main: { + options: { + mode: 'zip', + archive: './release/<%= pkg.name %>-v<%= pkg.version %>.zip' + }, + expand: true, + cwd: 'release/<%= pkg.version %>/', + src: ['**/*'], + dest: '<%= pkg.name %>/' + } + }, + + replace: { + readme: { + src: ['release/<%= pkg.version %>/readme.txt'], + overwrite: true, // overwrite matched source files + replacements: [{ + from: "[![Build Status](https://travis-ci.org/emrikol/focus.svg?branch=master)](https://travis-ci.org/emrikol/focus)\n\n", + to: '' + }] + } + }, + + // Bump plugin: grunt version:plugin:patch; grunt version:readme:patch + // Bump dropin: grunt version:dropin:patch + // Bump everything: grunt version::patch + + version: { + readme: { + options: { + prefix: 'Stable tag:\\s*' + }, + src: ['readme.txt'] + }, + plugin: { + options: { + prefix: 'Version:\\s*' + }, + src: [ 'focus.php', 'includes/admin-page.php' ] + }, + dropin: { + options: { + prefix: 'Version:\\s*' + }, + src: [ 'includes/object-cache.php' ] + }, + package: { + src: ['package.json'] + } + }, + + } ); + + require( 'load-grunt-tasks' )( grunt ); + + grunt.registerTask( 'readme', [ 'shell' ] ); + grunt.registerTask( 'release', [ 'clean', 'copy', 'replace', 'compress' ] ); + + grunt.util.linefeed = '\n'; +}; diff --git a/package.json b/package.json new file mode 100644 index 0000000..2299225 --- /dev/null +++ b/package.json @@ -0,0 +1,27 @@ +{ + "name": "focus-object-cache", + "title": "FOCUS Object Cache", + "description": "File-based Object Cache is Utterly Slow: An Object Caching Dropin for WordPress that uses the local file system.", + "version": "1.0.1", + "homepage": "https://github.com/emrikol/focus", + "repository": { + "type": "git", + "url": "https://github.com/emrikol/focus" + }, + "author": { + "name": "Derrick Tennant", + "email": "emrikol@gmail.com", + "url": "https://emrikol.com" + }, + "devDependencies": { + "grunt": "^1.0.1", + "grunt-contrib-clean": "^1.1.0", + "grunt-contrib-compress": "^1.4.3", + "grunt-contrib-copy": "^1.0.0", + "grunt-shell": "^2.1.0", + "grunt-text-replace": "^0.4.0", + "grunt-version": "^1.1.1", + "load-grunt-tasks": "^3.5.2" + }, + "license": "GPL-3.0" +} diff --git a/readme.txt b/readme.txt index f5bcdf1..5c33988 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: http://wordpressfoundation.org/donate/ Tags: cache, caching Requires at least: 4.3.11 Tested up to: 4.8 -Stable tag: 1.0.0 +Stable tag: 1.0.1 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html diff --git a/release/1.0.1/LICENSE b/release/1.0.1/LICENSE new file mode 100644 index 0000000..9cecc1d --- /dev/null +++ b/release/1.0.1/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + {one line to give the program's name and a brief idea of what it does.} + Copyright (C) {year} {name of author} + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + {project} Copyright (C) {year} {fullname} + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/release/1.0.1/focus.php b/release/1.0.1/focus.php new file mode 100644 index 0000000..5ae8081 --- /dev/null +++ b/release/1.0.1/focus.php @@ -0,0 +1,407 @@ +page = is_multisite() ? 'settings.php?page=focus-cache' : 'options-general.php?page=focus-cache'; + + add_action( is_multisite() ? 'network_admin_menu' : 'admin_menu', array( $this, 'add_admin_menu_page' ) ); + add_action( 'admin_notices', array( $this, 'show_admin_notices' ) ); + add_action( 'network_admin_notices', array( $this, 'show_admin_notices' ) ); + add_action( 'load-' . $this->screen, array( $this, 'do_admin_actions' ) ); + add_action( 'load-' . $this->screen, array( $this, 'add_admin_page_notices' ) ); + + add_filter( sprintf( + '%splugin_action_links_%s', + is_multisite() ? 'network_admin_' : '', + plugin_basename( __FILE__ ) + ), array( $this, 'add_plugin_actions_links' ) ); + } + + /** + * Registers the admin page in the UI + * + * @since 0.1.0 + * @access public + */ + public function add_admin_menu_page() { + global $wpmu_version; + if ( is_multisite() && $this->is_user_cache_admin() ) { + add_submenu_page( 'settings.php', esc_html__( 'FOCUS Cache', 'focus-cache' ), esc_html__( 'FOCUS Cache', 'focus-cache' ), 'manage_network_options', 'focus-cache', array( $this, 'render_admin_page' ) ); + } elseif ( $this->is_user_cache_admin() ) { + add_options_page( esc_html__( 'FOCUS Cache', 'focus-cache' ), esc_html__( 'FOCUS Cache', 'focus-cache' ), 'manage_options', 'focus-cache', array( $this, 'render_admin_page' ) ); + } + } + + /** + * Determines if a user can manage the cache. + * + * @since 0.1.0 + * @access public + */ + public function is_user_cache_admin() { + if ( function_exists( 'is_super_admin' ) ) { + return is_super_admin(); + } elseif ( function_exists( 'is_site_admin' ) ) { + return is_site_admin(); + } elseif ( current_user_can( 'manage_network_options' ) && is_multisite() ) { + return true; + } elseif ( current_user_can( 'manage_options' ) && ! is_multisite() ) { + return true; + } else { + return true; + } + } + + /** + * Returns the cache key prefix, if it exists + * + * @since 0.1.0 + * @access public + */ + public function get_focus_maxttl() { + return defined( 'WP_FOCUS_MAXTTL' ) ? WP_FOCUS_MAXTTL : null; + } + + /** + * Returns the cache key prefix, if it exists + * + * @since 0.1.0 + * @access public + */ + public function get_focus_cachekey_prefix() { + return defined( 'WP_CACHE_KEY_SALT' ) ? WP_CACHE_KEY_SALT : null; + } + + /** + * Actually does the heavy lifting to render the admin page. + * + * @since 0.1.0 + * @access public + */ + public function render_admin_page() { + if ( isset( $_GET['action'], $_GET['_wpnonce'] ) ) { // Input var okay. + $action = in_array( $_GET['action'], $this->actions, true ) ? $_GET['action'] : false; // @codingStandardsIgnoreLine. + + // request filesystem credentials? + if ( false !== $action && wp_verify_nonce( $_GET['_wpnonce'], $action ) ) { // @codingStandardsIgnoreLine. + $url = esc_url_raw( wp_nonce_url( network_admin_url( add_query_arg( 'action', rawurlencode( $action ), $this->page ) ), $action ) ); + if ( false === $this->initialize_filesystem( $url ) ) { + return; // request filesystem credentials. + } + } + } + + // show admin page. + require_once( plugin_dir_path( __FILE__ ) . 'includes/admin-page.php' ); + } + + /** + * Add settings link to plugin actions. + * + * @since 0.1.0 + * @access public + * + * @param array $links The plugin action links to filter. + * + * @return array Filtered plugin action links. + */ + public function add_plugin_actions_links( $links ) { + return array_merge( + array( sprintf( 'Settings', esc_url( network_admin_url( $this->page ) ) ) ), + $links + ); + } + + /** + * Determines if the required dropin is already in place. + * + * @since 0.1.0 + * @access public + * + * @return bool Existential status of dropin file. + */ + public function object_cache_dropin_exists() { + return file_exists( WP_CONTENT_DIR . '/object-cache.php' ); + } + + /** + * Helper function to validate if up-to-date dropin is installed. + * + * @since 0.1.0 + * @access public + * + * @return bool Existential status of dropin file. + */ + public function validate_object_cache_dropin() { + if ( ! $this->object_cache_dropin_exists() ) { + return false; + } + + $dropin = get_plugin_data( WP_CONTENT_DIR . '/object-cache.php' ); + $plugin = get_plugin_data( plugin_dir_path( __FILE__ ) . '/includes/object-cache.php' ); + + if ( 0 !== strcmp( $dropin['PluginURI'], $plugin['PluginURI'] ) ) { + return false; + } + + return true; + } + + /** + * Returns the status of the object cache dropin. + * + * @since 0.1.0 + * @access public + * + * @return string Status of the object cache dropin. + */ + public function get_status() { + if ( ! $this->object_cache_dropin_exists() ) { + return esc_html__( 'Disabled', 'focus-cache' ); + } + + if ( $this->validate_object_cache_dropin() ) { + return esc_html__( 'Enabled', 'focus-cache' ); + } + + return esc_html__( 'Unknown', 'focus-cache' ); + } + + /** + * Displays admin notifications concerning the dropin file. + * + * @since 0.1.0 + * @access public + */ + public function show_admin_notices() { + // Only show admin notices to users with the right capability. + if ( ! $this->is_user_cache_admin() ) { + return; + } + + if ( $this->object_cache_dropin_exists() ) { + $url = wp_nonce_url( network_admin_url( add_query_arg( 'action', 'update-dropin', $this->page ) ), 'update-dropin' ); + + if ( $this->validate_object_cache_dropin() ) { + $dropin = get_plugin_data( WP_CONTENT_DIR . '/object-cache.php' ); + $plugin = get_plugin_data( plugin_dir_path( __FILE__ ) . '/includes/object-cache.php' ); + + if ( version_compare( $dropin['Version'], $plugin['Version'], '<' ) ) { + $message = sprintf( __( 'The FOCUS cache drop-in is outdated. Please update it now.', 'focus-cache' ), esc_url( $url ) ); + } + } else { + $message = sprintf( __( 'Another object cache drop-in was found. To use FOCUS Cache, please replace it now.', 'focus-cache' ), esc_url( $url ) ); + } + + if ( isset( $message ) ) { + printf( '
%s
', wp_kses_post( $message ) ); + } + } + } + + /** + * Displays admin notifications concerning the plugin status. + * + * @since 0.1.0 + * @access public + */ + public function add_admin_page_notices() { + // Show action success/failure messages. + if ( isset( $_GET['message'] ) ) { // Input var okay. + switch ( $_GET['message'] ) { // Input var okay. + case 'cache-enabled': + $message = esc_html__( 'Object Cache enabled.', 'focus-cache' ); + break; + case 'enable-cache-failed': + $error = esc_html__( 'Object Cache could not be enabled.', 'focus-cache' ); + break; + case 'cache-disabled': + $message = esc_html__( 'Object Cache disabled.', 'focus-cache' ); + break; + case 'disable-cache-failed': + $error = esc_html__( 'Object Cache could not be disabled.', 'focus-cache' ); + break; + case 'cache-flushed': + $message = esc_html__( 'Object Cache flushed.', 'focus-cache' ); + break; + case 'flush-cache-failed': + $error = esc_html__( 'Object Cache could not be flushed.', 'focus-cache' ); + break; + case 'dropin-updated': + $message = esc_html__( 'Drop-in updated.', 'focus-cache' ); + break; + case 'update-dropin-failed': + $error = esc_html__( 'Drop-in could not be updated.', 'focus-cache' ); + break; + } + add_settings_error( '', 'focus-cache', isset( $message ) ? $message : $error, isset( $message ) ? 'updated' : 'error' ); + } + } + + /** + * Runs the specified admin action. + * + * @since 0.1.0 + * @access public + */ + public function do_admin_actions() { + if ( ! isset( $_GET['_wpnonce'], $_GET['action'] ) ) { // Input var okay. + return; + } + + $action = in_array( $_GET['action'], $this->actions, true ) ? sanitize_key( $_GET['action'] ) : false; // @codingStandardsIgnoreLine. + + // Verify nonce. + if ( ! wp_verify_nonce( $_GET['_wpnonce'], $action ) ) {// @codingStandardsIgnoreLine. + return; + } + + if ( in_array( $action, $this->actions, true ) ) { + $url = esc_url_raw( wp_nonce_url( network_admin_url( add_query_arg( 'action', rawurlencode( $action ), $this->page ) ), $action ) ); + + if ( 'flush-cache' === $action ) { + $message = wp_cache_flush() ? 'cache-flushed' : 'flush-cache-failed'; + } + + // Do we have filesystem credentials? + if ( $this->initialize_filesystem( $url, true ) ) { + global $wp_filesystem; + + switch ( $action ) { + case 'enable-cache': + $result = $wp_filesystem->copy( plugin_dir_path( __FILE__ ) . '/includes/object-cache.php', WP_CONTENT_DIR . '/object-cache.php', true ); + $message = $result ? 'cache-enabled' : 'enable-cache-failed'; + break; + case 'disable-cache': + $result = $wp_filesystem->delete( WP_CONTENT_DIR . '/object-cache.php' ); + $message = $result ? 'cache-disabled' : 'disable-cache-failed'; + break; + case 'update-dropin': + $result = $wp_filesystem->copy( plugin_dir_path( __FILE__ ) . '/includes/object-cache.php', WP_CONTENT_DIR . '/object-cache.php', true ); + $message = $result ? 'dropin-updated' : 'update-dropin-failed'; + break; + } + } + + // Redirect if status `$message` was set. + if ( isset( $message ) ) { + wp_safe_redirect( network_admin_url( add_query_arg( 'message', rawurlencode( $message ), $this->page ) ) ); + exit; + } + } + } + + /** + * Initializes the filesystem. + * + * @since 0.1.0 + * @access public + + * @param string $url The URL to request credentials against. + * @param bool $silent Whether or not the user form should be displayed. + * @return bool False if cannot init, true if can init. + */ + public function initialize_filesystem( $url, $silent = false ) { + if ( $silent ) { + ob_start(); + } + + if ( ( $credentials = request_filesystem_credentials( $url ) ) === false ) { + if ( $silent ) { + ob_end_clean(); + } + + return false; + } + + if ( ! WP_Filesystem( $credentials ) ) { + request_filesystem_credentials( $url ); + + if ( $silent ) { + ob_end_clean(); + } + + return false; + } + + return true; + } + + /** + * Runs when plugin is deactivated. + * + * @since 0.1.0 + * @access public + */ + public function on_deactivation() { + if ( $this->validate_object_cache_dropin() && $this->initialize_filesystem( '', true ) ) { + global $wp_filesystem; + $wp_filesystem->delete( WP_CONTENT_DIR . '/object-cache.php' ); + } + } +} + +new FOCUS_Cache; diff --git a/release/1.0.1/includes/admin-page.php b/release/1.0.1/includes/admin-page.php new file mode 100644 index 0000000..0bf747c --- /dev/null +++ b/release/1.0.1/includes/admin-page.php @@ -0,0 +1,66 @@ + + +
+ +

+

+ + + + + + + get_focus_cachekey_prefix() ) && trim( $this->get_focus_cachekey_prefix() ) !== '' ) : ?> + + + + + + + get_focus_maxttl() ) ) : ?> + + + + + + +
get_status() ); ?>
+ get_focus_cachekey_prefix() ); ?> +

The cache key prefix can be changed by setting the WP_CACHE_KEY_SALTcode> constant.

+
+ get_focus_maxttl() ); ?> seconds +

The maximum TTL can be changed by setting the WP_FOCUS_MAXTTL constant.

+
+

+ + object_cache_dropin_exists() ) : ?> +   + + + object_cache_dropin_exists() ) : ?> + + validate_object_cache_dropin() ) : ?> + + + +

+
diff --git a/release/1.0.1/includes/object-cache.php b/release/1.0.1/includes/object-cache.php new file mode 100644 index 0000000..75ceca3 --- /dev/null +++ b/release/1.0.1/includes/object-cache.php @@ -0,0 +1,1196 @@ +add( $key, $data, $group, $expire ); +} + +/** + * From WordPress Core: Adds a group or set of groups to the list of global groups. + * + * @since 0.1.0 + * + * @see WP_Object_Cache::add_global_groups() + * @global WP_Object_Cache $wp_object_cache Object cache global instance. + * + * @param string|array $groups A group or an array of groups to add. + */ +function wp_cache_add_global_groups( $groups ) { + global $wp_object_cache; + $wp_object_cache->add_global_groups( $groups ); +} + +/** + * From WordPress Core: Closes the cache. + * + * This function has ceased to do anything since WordPress 2.5. The + * functionality was removed along with the rest of the persistent cache. + * + * This does not mean that plugins can't implement this function when they need + * to make sure that the cache is cleaned up after WordPress no longer needs it. + * + * @since 0.1.0 + * + * @return true Always returns true. + */ +function wp_cache_close() { + return true; +} + +/** + * From WordPress Core: Decrements numeric cache item's value. + * + * @since 0.1.0 + * + * @see WP_Object_Cache::decr() + * @global WP_Object_Cache $wp_object_cache Object cache global instance. + * + * @param int|string $key The cache key to decrement. + * @param int $offset Optional. The amount by which to decrement the item's value. Default 1. + * @param string $group Optional. The group the key is in. Default empty. + * @return false|int False on failure, the item's new value on success. + */ +function wp_cache_decr( $key, $offset = 1, $group = 'default' ) { + global $wp_object_cache; + return $wp_object_cache->decr( $key, $offset, $group ); +} + +/** + * From WordPress Core: Removes the cache contents matching key and group. + * + * @since 0.1.0 + * + * @see WP_Object_Cache::delete() + * @global WP_Object_Cache $wp_object_cache Object cache global instance. + * + * @param int|string $key What the contents in the cache are called. + * @param string $group Optional. Where the cache contents are grouped. Default empty. + * @return bool True on successful removal, false on failure. + */ +function wp_cache_delete( $key, $group = 'default' ) { + global $wp_object_cache; + return $wp_object_cache->delete( $key, $group ); +} + +/** + * Removes cache contents for a given group. + * + * @since 0.1.0 + * + * @uses $wp_object_cache Object Cache Class + * @see WP_Object_Cache::delete_group() + * + * @param string $group Where the cache contents are grouped. + * @return bool True on successful removal, false on failure + */ +function wp_cache_delete_group( $group ) { + global $wp_object_cache; + return $wp_object_cache->delete_group( $group ); +} + +/** + * From WordPress Core: Removes all cache items. + * + * @since 0.1.0 + * + * @see WP_Object_Cache::flush() + * @global WP_Object_Cache $wp_object_cache Object cache global instance. + * + * @return bool False on failure, true on success + */ +function wp_cache_flush() { + global $wp_object_cache; + return $wp_object_cache->flush(); +} + +/** + * From WordPress Core: Retrieves the cache contents from the cache by key and group. + * + * @since 0.1.0 + * + * @see WP_Object_Cache::get() + * @global WP_Object_Cache $wp_object_cache Object cache global instance. + * + * @param int|string $key What the contents in the cache are called. + * @param string $group Where the cache contents are grouped. + * @param bool $force Whether to force an update of the local cache from the persistent cache (default is false). + * @param bool $found Whether key was found in the cache. Disambiguates a return of false, a storable value. + * @return bool|mixed False on failure to retrieve contents or the cache contents on success + */ +function wp_cache_get( $key, $group = 'default', $force = false, &$found = null ) { + global $wp_object_cache; + return $wp_object_cache->get( $key, $group, $force, $found ); +} + +/** + * From WordPress Core: Increment numeric cache item's value + * + * @since 0.1.0 + * + * @see WP_Object_Cache::incr() + * @global WP_Object_Cache $wp_object_cache Object cache global instance. + * + * @param int|string $key The key for the cache contents that should be incremented. + * @param int $offset Optional. The amount by which to increment the item's value. Default 1. + * @param string $group Optional. The group the key is in. Default empty. + * @return false|int False on failure, the item's new value on success. + */ +function wp_cache_incr( $key, $offset = 1, $group = 'default' ) { + global $wp_object_cache; + return $wp_object_cache->incr( $key, $offset, $group ); +} + +/** + * From WordPress Core: Sets up Object Cache Global and assigns it. + * + * @since 0.1.0 + * + * @global WP_Object_Cache $wp_object_cache + */ +function wp_cache_init() { + global $wp_object_cache; + $wp_object_cache = new WP_Object_Cache(); // override ok. +} + +/** + * From WordPress Core: Replaces the contents of the cache with new data. + * + * @since 0.1.0 + * + * @see WP_Object_Cache::replace() + * @global WP_Object_Cache $wp_object_cache Object cache global instance. + * + * @param int|string $key The key for the cache data that should be replaced. + * @param mixed $data The new data to store in the cache. + * @param string $group Optional. The group for the cache data that should be replaced. + * Default empty. + * @param int $expire Optional. When to expire the cache contents, in seconds. + * Default 0 (no expiration). + * @return bool False if original value does not exist, true if contents were replaced + */ +function wp_cache_replace( $key, $data, $group = 'default', $expire = 0 ) { + global $wp_object_cache; + return $wp_object_cache->replace( $key, $data, $group, $expire ); +} + +/** + * From WordPress Core: Saves the data to the cache. + * + * Differs from wp_cache_add() and wp_cache_replace() in that it will always write data. + * + * @since 0.1.0 + * + * @see WP_Object_Cache::set() + * @global WP_Object_Cache $wp_object_cache Object cache global instance. + * + * @param int|string $key The cache key to use for retrieval later. + * @param mixed $data The contents to store in the cache. + * @param string $group Optional. Where to group the cache contents. Enables the same key + * to be used across groups. Default empty. + * @param int $expire Optional. When to expire the cache contents, in seconds. + * Default 0 (no expiration). + * @return bool False on failure, true on success + */ +function wp_cache_set( $key, $data, $group = 'default', $expire = 0 ) { + global $wp_object_cache; + return $wp_object_cache->set( $key, $data, $group, $expire ); +} + +/** + * From WordPress Core: Switches the interal blog ID. + * + * This changes the blog id used to create keys in blog specific groups. + * + * @since 0.1.0 + * + * @see WP_Object_Cache::switch_to_blog() + * @global WP_Object_Cache $wp_object_cache Object cache global instance. + * + * @param int $blog_id Site ID. + */ +function wp_cache_switch_to_blog( $blog_id ) { + global $wp_object_cache; + return $wp_object_cache->switch_to_blog( $blog_id ); +} + +/** + * From WordPress Core: Adds a group or set of groups to the list of non-persistent groups. + * + * @since 0.1.0 + * + * @param string|array $groups A group or an array of groups to add. + */ +function wp_cache_add_non_persistent_groups( $groups ) { + global $wp_object_cache; + return $wp_object_cache->add_non_persistent_groups( $groups ); +} + +/** + * From WordPress Core: Core class that implements an object cache. + * + * The WordPress Object Cache is used to save on trips to the database. The + * Object Cache stores all of the cache data to memory and makes the cache + * contents available by using a key, which is used to name and later retrieve + * the cache contents. + * + * This implementation of the object cache uses flat files to store objects + * and overrides the core non-persistent cache. + * + * @since 0.1.0 + */ +class WP_Object_Cache { + /** + * The amount of times the cache data was already stored in the cache. + * + * @since 0.1.0 + * @access public + * @var int + */ + public $cache_hits = 0; + + /** + * Amount of times the cache did not have the request in cache. + * + * @since 0.1.0 + * @access public + * @var int + */ + public $cache_misses = 0; + + /** + * Stores operations by group for stats + * + * @since 0.1.0 + * @access private + * @var int + */ + var $group_ops = array(); + + /** + * Holds the cached objects. + * + * @since 0.1.0 + * @access private + * @var array + */ + var $cache = array(); + + /** + * List of global cache groups. + * + * @since 0.1.0 + * @access protected + * @var array + */ + var $global_groups = array(); + + /** + * Groups that should not be stored in persistent cache. + * + * @since 0.1.0 + * @access private + * @var array + */ + var $non_persistent_groups = array( 'comment' ); + + /** + * The blog prefix to prepend to keys in non-global groups. + * + * @since 0.1.0 + * @access private + * @var int + */ + var $blog_prefix; + + /** + * Directory where cache files are stored. + * + * @since 0.1.0 + * @access private + * @var string + */ + var $cache_dir; + + /** + * Secret to use for a hash salt. + * + * @since 0.1.0 + * @access private + * @var string + */ + var $secret = ''; + + /** + * Default maximum cache expiry. + * + * @since 0.1.0 + * @access private + * @var int + */ + public $default_expiration = WP_FOCUS_MAXTTL; + + /** + * Cache file header. + * + * @since 0.1.0 + * @access private + * @var string + */ + var $cache_serial_header = ''; + + /** + * Sets up object properties. + * + * @since 0.1.0 + * + * @global int $blog_id Global blog ID. + */ + function __construct() { + global $blog_id; + + if ( defined( 'CACHE_PATH' ) ) { + $this->cache_dir = CACHE_PATH; + } else { + $this->cache_dir = ABSPATH . 'wp-content' . DIRECTORY_SEPARATOR . 'focus-object-cache' . DIRECTORY_SEPARATOR; + } + + $this->_mkdir( $this->cache_dir ); + + $this->_salt_keys( WP_CACHE_KEY_SALT ); + $this->global_prefix = 'Global'; + $this->blog_prefix = 'WP'; + + if ( function_exists( 'is_multisite' ) && is_multisite() ) { + $this->blog_prefix = 'Site ' . $blog_id; + } + } + + /** + * Saves the object cache before object is completely destroyed. + * + * Called upon object destruction, which should be when PHP ends. + * + * @since 0.1.8 + * + * @return true Always returns true. + */ + public function __destruct() { + return true; + } + + /** + * Adds data to the cache if it doesn't already exist. + * + * @since 0.1.0 + * @access public + * + * @uses WP_Object_Cache::_isset_internal() Checks to see if the cache already has data. + * @uses WP_Object_Cache::set() Sets the data after the checking the cache contents existence. + * + * @param int|string $key What to call the contents in the cache. + * @param mixed $data The contents to store in the cache. + * @param string $group Optional. Where to group the cache contents. Default 'default'. + * @param int $expire Optional. When to expire the cache contents. Default 0 (maximum expiration). + * @return bool False if cache key and group already exist, true on success + */ + public function add( $key, $data, $group = 'default', $expire = 0 ) { + if ( wp_suspend_cache_addition() ) { + return false; + } + + $group = $this->_sanitize_cache_group( $group ); + $key = $this->_key( $key, $group ); + + if ( $this->_isset_internal( $key, $group ) ) { + return false; + } + + $force = null; + if ( false !== $this->get( $key, $group, false, $force, false ) ) { + return false; + } + + return $this->set( $key, $data, $group, (int) $expire ); + } + + /** + * Sets the list of global cache groups. + * + * @since 0.1.0 + * @access public + * + * @param array $groups List of groups that are global. + */ + public function add_global_groups( $groups ) { + $groups = (array) $groups; + + // Add and dedupe groups. + $groups = array_fill_keys( $groups, true ); + $this->global_groups = array_merge( $this->global_groups, $groups ); + $this->global_groups = array_unique( $this->global_groups ); + } + + /** + * Sets the list of non-persistent cache groups. + * + * @since 0.1.0 + * @access public + * + * @param array $groups List of groups that are global. + */ + public function add_non_persistent_groups( $groups ) { + $groups = (array) $groups; + + // Add and dedupe groups. + $groups = array_fill_keys( $groups, true ); + $this->non_persistent_groups = array_merge( $this->non_persistent_groups, $groups ); + $this->non_persistent_groups = array_unique( $this->non_persistent_groups ); + } + + /** + * Decrements numeric cache item's value. + * + * @since 0.1.0 + * @access public + * + * @param int|string $key The cache key to decrement. + * @param int $offset Optional. The amount by which to decrement the item's value. Default 1. + * @param string $group Optional. The group the key is in. Default 'default'. + * @return false|int False on failure, the item's new value on success. + */ + public function decr( $key, $offset = 1, $group = 'default' ) { + $group = $this->_sanitize_cache_group( $group ); + $key = $this->_key( $key, $group ); + + // Key/Group doesn't exist, return false. + if ( ! $this->_isset_internal( $key, $group ) ) { + return false; + } + + // Sanitize value. + $this->cache[ $group ][ $key ] = (int) $this->cache[ $group ][ $key ]; + + // Sanitize offset. + $offset = (int) $offset; + + // Decrement value. + $this->cache[ $group ][ $key ] -= $offset; + + // Do not let value go negative. + $this->cache[ $group ][ $key ] = max( 0, $this->cache[ $group ][ $key ] ); + + // Save new value to the cache. + $this->set( $key, $this->cache[ $group ][ $key ], $group, $this->_get_expiration( $key, $group ) ); + + // Return new value. + return $this->cache[ $group ][ $key ]; + } + + /** + * Removes the contents of the cache key in the group. + * + * If the cache key does not exist in the group, then nothing will happen. + * + * @since 0.1.0 + * @access public + * + * @param int|string $key What the contents in the cache are called. + * @param string $group Optional. Where the cache contents are grouped. Default 'default'. + * @return bool False if the contents weren't deleted and true on success. + */ + public function delete( $key, $group = 'default' ) { + $group = $this->_sanitize_cache_group( $group ); + $key = $this->_key( $key, $group ); + $return = true; + + // Key/Group doesn't exist, return false. + if ( ! $this->_isset_internal( $key, $group ) ) { + $return = false; + } + + // Delete cached item and return true. + unset( $this->cache[ $group ][ $key ] ); + + // Delet the cache file. + if ( $this->_focus_file_exists( $key, $group ) ) { + unlink( $this->_get_focus_file( $key, $group ) ); // @codingStandardsIgnoreLine + } + + // Stats. + $this->group_ops[ $group ][] = 'Delete ' . $key; + + return $return; + } + + /** + * Remove the contents of all cache keys in the group. + * + * @since 0.1.0 + * @access public + * + * @param string $group Optional. Where the cache contents are grouped. Default 'default'. + * @return bool False if not deleted and true on success. + */ + public function delete_group( $group = false ) { + if ( false === $group ) { + return false; + } + + if ( ! $this->_should_persist( $group ) && ! isset( $this->cache[ $group ] ) ) { + return false; + } + + // Delete local cache group. + unset( $this->cache[ $group ] ); + + // Mark all files as expired, just in case delete times out. + foreach ( glob( $this->cache_dir . $group . '/*.*' ) as $filename ) { + if ( is_file( $filename ) ) { + touch( $filename, time() - 3600 ); // @codingStandardsIgnoreLine + } + } + + // Delet the cache group dir. + $this->_rm_cache_dir( $this->cache_dir . $group ); + + return true; + } + + /** + * Clears the object cache of all data. + * + * @since 0.1.0 + * @access public + * + * @return true Always returns true. + */ + public function flush() { + // Delete all data in cache directory, empty memory cache. + $this->_rm_cache_dir( $this->cache_dir ); + $this->cache = array(); + return true; + } + + /** + * Retrieves the cache contents, if it exists. + * + * The contents will be first attempted to be retrieved by searching by the + * key in the cache group. If the cache is hit (success) then the contents + * are returned. + * + * On failure, the number of cache misses will be incremented. + * + * @since 0.1.0 + * @access public + * + * @param int|string $key What the contents in the cache are called. + * @param string $group Where the cache contents are grouped. + * @param string $force Whether to force a refetch rather than relying on the local cache (default is false). + * @param bool $found Optional. Whether the key was found in the cache. Disambiguates a return of false, a storable value. Passed by reference. Default null. + * @param bool $stat Optional. Whether or not to record stats. Default true. + * @return bool|mixed False on failure to retrieve contents or the cache contents on success + */ + public function get( $key, $group = 'default', $force = false, &$found = null, $stat = true ) { + $group = $this->_sanitize_cache_group( $group ); + $key = $this->_key( $key, $group ); + + // Memory cache exists, please grab. + if ( $this->_isset_internal( $key, $group ) && ! $force ) { + // Stats. + if ( $stat ) { + $this->group_ops[ $group ][] = 'Hit (Mem): ' . $key; + $this->cache_hits++; + } + + $found = true; + return $this->cache[ $group ][ $key ]; + } + + // FOCUS Cache file exists, please grab. + if ( $this->_focus_file_exists( $key, $group ) ) { + // If the object has expired, remove it from the cache and return false to force a refresh. + if ( $this->_get_expiration( $key, $group ) < 0 ) { + $this->delete( $key, $group ); + + // Stats. + if ( $stat ) { + $this->group_ops[ $group ][] = 'Miss (Expired): ' . $key; + $this->cache_misses++; + } + + $found = false; + return false; + } + + $this->cache[ $group ][ $key ] = maybe_unserialize( base64_decode( substr( file_get_contents( $this->_get_focus_file( $key, $group ) ), strlen( $this->cache_serial_header ), - strlen( $this->cache_serial_footer ) ) ) ); // @codingStandardsIgnoreLine + + // Stats. + if ( $stat ) { + $this->group_ops[ $group ][] = 'Hit (FOCUS): ' . $key; + $this->cache_hits++; + } + + if ( is_object( $this->cache[ $group ][ $key ] ) ) { + $found = true; + return clone $this->cache[ $group ][ $key ]; + } + + $found = true; + return $this->cache[ $group ][ $key ]; + } + + if ( $stat ) { + $this->group_ops[ $group ][] = 'Miss (Empty): ' . $key; + $this->cache_misses++; + } + $found = false; + return false; + } + + /** + * Increments numeric cache item's value. + * + * @since 0.1.0 + * @access public + * + * @param int|string $key The cache key to increment. + * @param int $offset Optional. The amount by which to increment the item's value. Default 1. + * @param string $group Optional. The group the key is in. Default 'default'. + * @return false|int False on failure, the item's new value on success. + */ + public function incr( $key, $offset = 1, $group = 'default' ) { + $group = $this->_sanitize_cache_group( $group ); + $key = $this->_key( $key, $group ); + + // Key/Group doesn't exist, return false. + if ( ! $this->_isset_internal( $key, $group ) ) { + return false; + } + + // Sanitize value. + $this->cache[ $group ][ $key ] = (int) $this->cache[ $group ][ $key ]; + + // Sanitize offset. + $offset = (int) $offset; + + // Increment value. + $this->cache[ $group ][ $key ] += $offset; + + // Never go below 0. + if ( $this->cache[ $group ][ $key ] < 0 ) { + $this->cache[ $group ][ $key ] = 0; + } + + // Save new value to the cache. + $current_expiry = $this->_get_expiration( $key, $group ); + $this->set( $key, $this->cache[ $group ][ $key ], $group, $current_expiry ); + + // Return new value. + return $this->cache[ $group ][ $key ]; + } + + /** + * Replaces the contents in the cache, if contents already exist. + * + * @since 0.1.0 + * @access public + * + * @see WP_Object_Cache::set() + * + * @param int|string $key What to call the contents in the cache. + * @param mixed $data The contents to store in the cache. + * @param string $group Optional. Where to group the cache contents. Default 'default'. + * @param int $expire Optional. When to expire the cache contents. Default 0 (no expiration). + * @return bool False if not exists, true if contents were replaced. + */ + public function replace( $key, $data, $group = 'default', $expire = 0 ) { + $group = $this->_sanitize_cache_group( $group ); + $key = $this->_key( $key, $group ); + + // Key/Group doesn't exist, return false. + if ( ! $this->_isset_internal( $key, $group ) ) { + return false; + } + + return $this->set( $key, $data, $group, (int) $expire ); + } + + /** + * Sets the data contents into the cache. + * + * The cache contents is grouped by the $group parameter followed by the + * $key. This allows for duplicate ids in unique groups. Therefore, naming of + * the group should be used with care and should follow normal function + * naming guidelines outside of core WordPress usage. + * + * The $expire parameter is not used, because the cache will automatically + * expire for each time a page is accessed and PHP finishes. The method is + * more for cache plugins which use files. + * + * @since 0.1.0 + * @access public + * + * @param int|string $key What to call the contents in the cache. + * @param mixed $data The contents to store in the cache. + * @param string $group Optional. Where to group the cache contents. Default 'default'. + * @param int $expire Not Used. + * @return true Always returns true. + */ + public function set( $key, $data, $group = 'default', $expire = 0 ) { + $group = $this->_sanitize_cache_group( $group ); + $key = $this->_key( $key, $group ); + + if ( 0 === $expire ) { + $expire = $this->default_expiration; + } + + // Clone objects. + if ( is_object( $data ) ) { + $data = clone $data; + } + + $this->cache[ $group ][ $key ] = $data; + + // Stats. + $this->group_ops[ $group ][] = 'Set ' . $group . '/' . $key . ' (' . $expire . 's)'; + + return $this->_save( $key, $data, $group, $expire ); + } + + /** + * Echoes the stats of the caching. + * + * Gives the cache hits, and cache misses. Also prints every cached group, + * key and the data. + * + * @since 0.1.0 + * @access public + */ + public function stats() { + ?> +

Cache Hits: cache_hits ); ?>

+

Cache Misses: cache_misses ); ?>

+

Object Cache:

+ group_ops as $group => $ops ) : ?> + Too many to show! Show them anyway.\n"; + } + ?> +

commands

+
+ _colorize_debug_line( $op ) . '
' ); + } + ?> +
+ + blog_prefix = 'Site ' . (int) $blog_id; + } + + /** + * Serves as a utility function to colorize cache stats. + * + * @since 0.1.0 + * @access protected + * + * @param string $line Stats to be colorized. + * @return string HTML colorized stats. + */ + protected function _colorize_debug_line( $line ) { + $colors = array( + 'Get' => 'green', + 'Set' => 'purple', + 'Add' => 'blue', + 'Delete' => 'red', + 'Hit' => 'orange', + 'Miss' => 'brown', + ); + + $cmd = substr( $line, 0, strpos( $line, ' ' ) ); + + $cmd2 = '' . esc_html( $cmd ) . ''; + + return $cmd2 . substr( $line, strlen( $cmd ) ); + } + + /** + * Does this group use persistent storage? + * + * @since 0.1.0 + * + * @param string $group Cache group. + * @return bool true if the group is persistent, false if not. + */ + protected function _should_persist( $group ) { + return empty( $this->non_persistent_groups[ $group ] ); + } + + /** + * Serves as a utility function to determine whether a key exists in the cache. + * + * @since 0.1.0 + * @access protected + * + * @param int|string $key Cache key to check for existence. + * @param string $group Cache group for the key existence check. + * @return bool Whether the key exists in the cache for the given group. + */ + protected function _isset_internal( $key, $group ) { + return isset( $this->cache[ $group ] ) && ( isset( $this->cache[ $group ][ $key ] ) || array_key_exists( $key, $this->cache[ $group ] ) ); + } + + /** + * Serves as a utility function to determine if a cache file exists. + * + * @since 0.1.0 + * @access protected + * + * @param int|string $key Cache key to check for existence. + * @param string $group Cache group for the key existence check. + * @return bool Whether the cache file key exists. + */ + protected function _focus_file_exists( $key, $group ) { + return file_exists( $this->_get_focus_file( $key, $group ) ); + } + + /** + * Serves as a utility function to determine the cache expiration. + * + * @since 0.1.0 + * @access protected + * + * @param int|string $key Cache key to check. + * @param string $group Cache group for the key check. + * @return int Seconds until the cache expires. + */ + protected function _get_expiration( $key, $group ) { + if ( $this->_focus_file_exists( $key, $group ) ) { + return ( filemtime( $this->_get_focus_file( $key, $group ) ) - time() ); + } + + return 0; + } + + /** + * Serves as a utility function to determine the cache file. + * + * @since 0.1.0 + * @access protected + * + * @param int|string $key Cache key to check. + * @param string $group Cache group for the key check. + * @return string The cache file. + */ + protected function _get_focus_file( $key, $group ) { + // Some characters might cause problems with the file system. + $protected_chars = array( + '/' => rawurlencode( '/' ), + '\\' => rawurlencode( '\\' ), + '?' => rawurlencode( '?' ), + '*' => rawurlencode( '*' ), + '|' => rawurlencode( '|' ), + '"' => rawurlencode( '"' ), + '\'' => rawurlencode( '\'' ), + '<' => rawurlencode( '<' ), + '>' => rawurlencode( '>' ), + ); + + $key = str_replace( array_keys( $protected_chars ), $protected_chars, $key ); + + return $this->cache_dir . $group . '/' . $key . '.php'; + } + + /** + * Normalizes key + * + * @since 0.1.0 + * @access public + * + * @param int|string $key Cache key to check. + * @param string $group Cache group for the key check. + * @return string Normalized copy of key. + */ + public function _key( $key, $group ) { + $group = $this->_sanitize_cache_group( $group ); + + $prefix = $this->key_salt; + + if ( ! empty( $this->global_groups[ $group ] ) ) { + $prefix .= $this->global_prefix; + } else { + $prefix .= $this->blog_prefix; + } + + if ( empty( $prefix ) ) { + $prefix = 'WP'; + } + + // Remove whitespace. + $prefix = preg_replace( '/\s+/', '', $prefix ); + $key = preg_replace( '/\s+/', '', $key ); + + $normalized_key = $prefix . ':' . $key; + + // Remove dulicate prefixes. Where are these coming from?! + $normalized_key = preg_replace( '/^' . $prefix . ':' . $prefix . ':/', $prefix . ':', $normalized_key ); + + return $normalized_key; + } + + /** + * Salts cache key prefix + * + * @since 0.1.0 + * @access protected + * + * @param string $key_salt Salt to use. + */ + protected function _salt_keys( $key_salt ) { + if ( strlen( $key_salt ) ) { + $this->key_salt = $key_salt . ':'; + } else { + $this->key_salt = ''; + } + } + + /** + * Serves as a utility function to create cache group directories. + * + * @since 0.1.0 + * @access protected + * + * @param string $group Cache group for directory creation. + * @return string The cache group directory. + */ + protected function _make_group_dir( $group = 'default' ) { + $cache_dir = $this->cache_dir; + $make_dir = ''; + + foreach ( explode( '/', $group ) as $subdir ) { + $make_dir .= $subdir . '/'; + $this->_mkdir( $cache_dir . $make_dir ); + } + + return $cache_dir . $group . '/'; + } + + /** + * Serves as a utility function to create directories. + * + * @since 0.1.0 + * @access protected + * + * @param string $dir Directory to create. + */ + protected function _mkdir( $dir ) { + // Give the new dirs the same perms as wp-content. + $stat = stat( ABSPATH . 'wp-content' ); + $dir_perms = $stat['mode'] & 0007777; // Get the permission bits. + $file_perms = $dir_perms & 0000666; // Remove execute bits for files. + + // Make the base cache dir. + if ( ! file_exists( $dir ) ) { + if ( ! mkdir( $dir ) ) { // @codingStandardsIgnoreLine + return false; + } + chmod( $dir, $dir_perms ); // @codingStandardsIgnoreLine + } + + if ( ! file_exists( $dir . 'index.php' ) ) { + touch( $dir . 'index.php' ); // @codingStandardsIgnoreLine + chmod( $dir . 'index.php', $file_perms ); // @codingStandardsIgnoreLine + } + } + + /** + * Serves as a utility function to delete directories. + * + * @since 0.1.0 + * @access protected + * + * @param string $dir Directory to delete. + */ + protected function _rm_cache_dir( $dir ) { + $dir_object = @opendir( $dir ); // @codingStandardsIgnoreLine + + if ( false === $dir_object ) { + return false; + } + + while ( false !== ( $file_object = readdir( $dir_object ) ) ) { + if ( '.' === $file_object || '..' === $file_object ) { + continue; + } + + $dir_path = $dir . DIRECTORY_SEPARATOR . $file_object; + + if ( is_dir( $dir_path ) ) { + $this->_rm_cache_dir( $dir_path ); + } else { + unlink( $dir_path ); // @codingStandardsIgnoreLine + } + } + + closedir( $dir_object ); + rmdir( $dir ); // @codingStandardsIgnoreLine + } + + /** + * Serves as a utility function to create multisite cache group names. + * + * @since 0.1.0 + * @access public + * + * @param int $group Cache group to sanitize. + * @return string Sanitized cache group. + */ + public function _sanitize_cache_group( $group ) { + if ( empty( $group ) ) { + $group = 'default'; + } + return $group; + } + + /** + * Serves as a utility function to save the cache data to a file. + * + * @since 0.1.0 + * @access protected + * + * @param int|string $key What to call the contents in the cache. + * @param mixed $data The contents to store in the cache. + * @param string $group Optional. Where to group the cache contents. Default 'default'. + * @param int $expire Cache expiration. + */ + protected function _save( $key, $data, $group = 'default', $expire = 0 ) { + $cache_dir = $this->cache_dir; + + if ( 0 === $expire ) { + $expire = $this->default_expiration; + } + + // Give the new dirs the same perms as wp-content. + $stat = stat( ABSPATH . 'wp-content' ); + $dir_perms = $stat['mode'] & 0007777; // Get the permission bits. + $file_perms = $dir_perms & 0000666; // Remove execute bits for files. + + // Make FOCUS Cache directories and temp file. + $this->_mkdir( $cache_dir ); + $group_dir = $this->_make_group_dir( $group, $dir_perms ); + $cache_file = $this->_get_focus_file( $key, $group ); + $temp_file = tempnam( $cache_dir, 'tmp' ); // @codingStandardsIgnoreLine + if ( false === $temp_file ) { + return false; + } + + // Serialize, Base64 Encode, and add Header/Footer. + // `maybe_serialize()` causes issues with variable typing, can't use. + $serial = $this->cache_serial_header . base64_encode( serialize( $data ) ) . $this->cache_serial_footer; // @codingStandardsIgnoreLine + + $fd = fopen( $temp_file, 'w' ); + if ( false === $fd ) { + return false; + } + + $fwrite = fwrite( $fd, $serial ); // @codingStandardsIgnoreLine + if ( false === $fwrite ) { + return false; + } + + fclose( $fd ); + + if ( ! rename( $temp_file, $cache_file ) ) { // @codingStandardsIgnoreLine + unlink( $temp_file ); // @codingStandardsIgnoreLine + return false; + } + + $chmod = chmod( $cache_file, $file_perms ); // @codingStandardsIgnoreLine + if ( false === $chmod ) { + return false; + } + + // Set expiry. + $touch = touch( $cache_file, time() + $expire ); // @codingStandardsIgnoreLine + if ( false === $touch ) { + return false; + } + return true; + } +} diff --git a/release/1.0.1/readme.txt b/release/1.0.1/readme.txt new file mode 100644 index 0000000..5d257ec --- /dev/null +++ b/release/1.0.1/readme.txt @@ -0,0 +1,41 @@ +=== FOCUS Cache === +Contributors: emrikol +Donate link: http://wordpressfoundation.org/donate/ +Tags: cache, caching +Requires at least: 4.3.11 +Tested up to: 4.8 +Stable tag: 1.0.0 +License: GPLv2 or later +License URI: http://www.gnu.org/licenses/gpl-2.0.html + +File-based Object Cache is Utterly Slow: An Object Caching Dropin for WordPress that uses the local file system. + +== Description == + +I needed a persistent object cache while doing work on a budget hosting provider. A lot of the other file-based caching plugins were either bundled with other things I didn't need (W3 Total Cache), or were old and broken. + +On the sites I've tested this with, that have slow database servers, I have noticed an increase in page generation times of about 2x. On the other hand, for sites that have fast database servers it can actually _increase_ page generation time. Whenever possible, I'd recommend using Memcached, Redis, or your other quality cache of choice. + +I've been heavily influenced by [redis-cache](https://wordpress.org/plugins/redis-cache/), [wp-redis](https://wordpress.org/plugins/wp-redis/), [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/), and [wp-memcached](https://github.com/Automattic/wp-memcached) to name a few. + +== Installation == + +Install like any other plugin, directly from your plugins page or manually by copying the files to the `plugins/` folder. Go to the plugin settings page at Settings->FOCUS Cache and click `Enable Object Cache`. + +== Changelog == + += 1.0.1 = + +* Bugfix: Plugin was unable to be activated in the "Add Plugins" page. This was due to the fact that WordPress detected the wrong PHP file as the plugin and tried to activate it. Renaming the "Plugin Name" header from the PHP files in the `includes/` directory resolved the issue. Thanks to @ramonjosegn on the WordPress.org Support Forums for bringing this to my attention. +* Bugfix: The plugin is now required to be activated across all sites in a multisite installation. +* Readme updates. + += 1.0.0 = + +First Version + +== Upgrade Notice == + += 1.0.1 = + +The plugin can now be properly activated via the "Add Plugins" screen. \ No newline at end of file diff --git a/release/focus-object-cache-v1.0.1.zip b/release/focus-object-cache-v1.0.1.zip new file mode 100644 index 0000000000000000000000000000000000000000..be653d23cf06fd5579913905a46ae696007967f2 GIT binary patch literal 29349 zcma&MV~j3Pw{BUxY}>YN+qP}nwad0`+qP}n##`3D-#MLhpT4Ru6*R;-RRk4pJ8NqtA;-xnWC^E5_e8X1q+ zHc+V8-CfT-FUz!s!`br3+(Y-h`-;bvi>_>usNb{2r(o}wtFK=rf9!8{urA)$pz3;> zu0al7g;m}>LfEiaRwzIghefh^(s9lrs`vhfIUwawdKtsbThesk@jsziji*##|F+$KV#} zV{(sosk9tsh46gS1$iul5VwidzQjkk@yYX+CU@kM71L3wdwNC8TdqWqJZ#LvFW}=A zL3EbCaw72vBYKdOO7phyhH-e3_wFCiV%Z06SuBAYJjgC?1uxCS-{+g#9R&OD$U4>V z^5NWE%NlQMjZkk~G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|NjF_&KJgz8f$jgu`OmJQC<6}h&*Kn( Ok2PQ*pjL-}?*0#?Zz`++ literal 0 HcmV?d00001 From 38d319016639d76aea964d9b7f76bb9c017742cb Mon Sep 17 00:00:00 2001 From: emrikol Date: Fri, 23 Jun 2017 05:55:52 +0000 Subject: [PATCH 6/6] Readme version bump --- readme.md | 2 +- release/1.0.1/readme.txt | 2 +- release/focus-object-cache-v1.0.1.zip | Bin 29349 -> 29349 bytes 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index 674e175..b1a00eb 100644 --- a/readme.md +++ b/readme.md @@ -4,7 +4,7 @@ **Tags:** cache, caching **Requires at least:** 4.3.11 **Tested up to:** 4.8 -**Stable tag:** 1.0.0 +**Stable tag:** 1.0.1 **License:** GPLv2 or later **License URI:** http://www.gnu.org/licenses/gpl-2.0.html diff --git a/release/1.0.1/readme.txt b/release/1.0.1/readme.txt index 5d257ec..d65e307 100644 --- a/release/1.0.1/readme.txt +++ b/release/1.0.1/readme.txt @@ -4,7 +4,7 @@ Donate link: http://wordpressfoundation.org/donate/ Tags: cache, caching Requires at least: 4.3.11 Tested up to: 4.8 -Stable tag: 1.0.0 +Stable tag: 1.0.1 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html diff --git a/release/focus-object-cache-v1.0.1.zip b/release/focus-object-cache-v1.0.1.zip index be653d23cf06fd5579913905a46ae696007967f2..abd0d89d0a3dbcf0557a5f1263e87a3bfd0aa702 100644 GIT binary patch delta 1053 zcmV+&1mgRp14JENLE)4?kE|XymI07v$vzrYb1OgE* zv%3*(S_1GclPYZFe`m!9RY~LJjNUIkY|hC#(tzdm=k#=cdw{pyP8t&vB%Sa1Y18ZR zIa0Nu(?xNkv>cbhqwHPzRaRl(L3w%#$g6kspzU@>m*zMCebBYDy)v`{glF)uU>+#6 z=qh@27r>^rmC&?84e~qm)=i26gkMWvIn^^=AiOAU$w*lPe}bT1I>_*knO^7a08!1)^h6NUvU<|Et&U8V?M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