Compare commits

..

3 commits

Author SHA1 Message Date
Peter Molnar
b894610cb1 typos 2017-02-11 00:11:35 +00:00
Peter Molnar
eac45ed95e Merge branch 'master' of github:/petermolnar/wp-ffpc
Conflicts:
	wp-ffpc-class.php
2017-02-10 21:34:54 +00:00
Peter Molnar
705afd1535 cleanup for development hibernation 2017-02-10 21:32:34 +00:00
8 changed files with 1312 additions and 3055 deletions

79
.gitignore vendored
View file

@ -1,81 +1,2 @@
vendor
composer.lock
### Example user template template
### Example user template
# IntelliJ project files
.idea
*.iml
out
gen### OSX template
*.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff:
.idea/workspace.xml
.idea/tasks.xml
.idea/dictionaries
.idea/vcs.xml
.idea/jsLibraryMappings.xml
# Sensitive or high-churn files:
.idea/dataSources.ids
.idea/dataSources.xml
.idea/dataSources.local.xml
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml
# Gradle:
.idea/gradle.xml
.idea/libraries
# Mongo Explorer plugin:
.idea/mongoSettings.xml
## File-based project format:
*.iws
## Plugin-specific files:
# IntelliJ
/out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

File diff suppressed because one or more lines are too long

View file

@ -1,156 +0,0 @@
<?php
if (!class_exists('WP_FFPC_Backend_redis')):
class WP_FFPC_Backend_redis extends WP_FFPC_Backend {
protected function _init () {
/* Memcached class does not exist, Memcached extension is not available */
if (!class_exists('Redis')) {
$this->log ( __translate__('Redis extension missing, wp-ffpc will not be able to function correctly!', $this->plugin_constant ), LOG_WARNING );
return false;
}
/* check for existing server list, otherwise we cannot add backends */
if ( empty ( $this->options['servers'] ) && ! $this->alive ) {
$this->log ( __translate__("Redis servers list is empty, init failed", $this->plugin_constant ), LOG_WARNING );
return false;
}
/* check is there's no backend connection yet */
if ( $this->connection === NULL ) {
$this->connection = new Redis();
}
/* check if initialization was success or not */
if ( $this->connection === NULL ) {
$this->log ( __translate__( 'error initializing Redis PHP extension, exiting', $this->plugin_constant ) );
return false;
}
/* check if we already have list of servers, only add server(s) if it's not already connected *
$servers_alive = array();
if ( !empty ( $this->status ) ) {
$servers_alive = $this->connection->getServerList();
/* create check array if backend servers are already connected *
if ( !empty ( $servers ) ) {
foreach ( $servers_alive as $skey => $server ) {
$skey = $server['host'] . ":" . $server['port'];
$servers_alive[ $skey ] = true;
}
}
}
/* adding servers */
foreach ( $this->options['servers'] as $server_id => $server ) {
/* only add servers that does not exists already in connection pool */
if ( !@array_key_exists($server_id , $servers_alive ) ) {
if ( $server['port'] != 0)
$this->connection->connect($server['host'], $server['port'] );
else
$this->connection->connect($server['host'] );
if ( isset($this->options['authpass']) && !empty($this->options['authpass']) )
$this->connection->auth ( $this->options['authpass'] );
$this->log ( sprintf( __translate__( '%s added', $this->plugin_constant ), $server_id ) );
}
}
/* backend is now alive */
$this->alive = true;
$this->_status();
}
/**
* sets current backend alive status for Memcached servers
*
*/
protected function _status () {
/* server status will be calculated by getting server stats */
$this->log ( __translate__("checking server status", $this->plugin_constant ));
try {
$info = $this->connection->ping();
} catch ( Exception $e ) {
$this->log ( __translate__("Exception occured: " . json_encode($e), $this->plugin_constant ));
}
$status = empty( $info ) ? 0 : 1;
foreach ( $this->options['servers'] as $server_id => $server ) {
/* reset server status to offline */
$this->status[$server_id] = $status;
}
}
/**
* get function for Memcached backend
*
* @param string $key Key to get values for
*
*/
protected function _get ( &$key ) {
return $this->connection->get($key);
}
/**
* Set function for Memcached backend
*
* @param string $key Key to set with
* @param mixed $data Data to set
*
*/
protected function _set ( &$key, &$data, &$expire ) {
$result = $this->connection->set ( $key, $data, $expire );
/* if storing failed, log the error code */
//if ( $result === false ) {
$this->log ( sprintf( __translate__( 'set entry returned: %s', $this->plugin_constant ), $result ) );
//}
return $result;
}
/**
*
* Flush memcached entries
*/
protected function _flush ( ) {
try {
$r = $this->connection->flushDB();
} catch ( Exception $e ) {
$this->log ( sprintf( __translate__( 'unable to flush, error: %s', $this->plugin_constant ), json_encode($r) ) );
}
return $r;
}
/**
* Removes entry from Memcached or flushes Memcached storage
*
* @param mixed $keys String / array of string of keys to delete entries with
*/
protected function _clear ( &$keys ) {
/* make an array if only one string is present, easier processing */
if ( !is_array ( $keys ) )
$keys = array ( $keys => true );
try {
$kresult = $this->connection->delete( $keys );
} catch ( Exception $e ) {
$this->log ( sprintf( __translate__( 'unable to delete entry(s): %s', $this->plugin_constant ), json_encode($key) ) );
$this->log ( sprintf( __translate__( 'Redis error: %s', $this->plugin_constant ), json_encode($e) ) );
}
finally {
$this->log ( sprintf( __translate__( 'entry(s) deleted: %s', $this->plugin_constant ), json_encode($keys) ) );
}
}
}
endif;

View file

@ -1,92 +1,72 @@
=== WP-FFPC ===
Contributors: cadeyrn, ameir, haroldkyle, plescheff, dkcwd, IgorCode
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=XU3DG7LLA76WC
Tags: cache, page cache, full page cache, nginx, memcached, apc, speed
Contributors: cadeyrn
Tags: cache, nginx, memcached, apc
Requires at least: 3.0
Tested up to: 4.5
Tested up to: 4.7.2
Stable tag: 1.11.2
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.html
The fastest way to cache: use the memory!
A fast, memory based full page cache plugin supporting APC or memcached.
== Description ==
WP-FFPC ( WordPress Fast Full Page Cache ) is a cache plugin for [WordPress](http://wordpress.org/ "WordPress"). It works with any webserver, including apache2, lighttpd, nginx.
**WARNING** The development of WP-FFPC had been put on hold.
If you need new features, please send code and pull requests to [WP FFPC @ Github](https://github.com/petermolnar/wp-ffpc).
It can be configured to join forces with [NGiNX](http://NGiNX.org "NGiNX")'s built-in [memcached plugin](http://nginx.org/en/docs/http/ngx_http_memcached_module.html "memcached plugin").
*A short why: I developed this plugin in 2010 to support my own site. Right now, as it is, it's working on a few sites I still maintain for friends and since I don't need any additional features, I'm not planning to extend it with things I have no real use of. During the past years I've received some heartwarming donations - unfortunately the amount never came close to consider the project financially beneficial. I removed the donation links and put it on hold for now.*
= **IMPORTANT NOTES, PLEASE READ THIS LIST** =
* Requirements:
* WordPress >= 3.0
* **at least one** of the following for storage backend:
WP-FFPC is a cache plugin for [WordPress](http://wordpress.org/ "WordPress").
It works with any webserver, including, but not limited to, apache2, lighttpd, nginx.
It can be configured together with [NGiNX](http://NGiNX.org "NGiNX") but use [memcached plugin](http://nginx.org/en/docs/http/ngx_http_memcached_module.html "memcached plugin") directly from the webserver, bypassing PHP.
= Requirements =
**This plugin does not kick in right after activation**. You have to adjust the setting in Settings -> WP-FFPC and save the settings.*
* WordPress >= 3.0
* **at least one** of the following for storage backend:
* memcached with [PHP Memcached](http://php.net/manual/en/book.memcached.php "Memcached") > 0.1.0
* memcached with [PHP Memcache](http://php.net/manual/en/book.memcache.php "Memcache") > 2.1.0
* [APC](http://php.net/manual/en/book.apc.php "APC")
* [APCu](http://pecl.php.net/package/APCu "APC User Cache")
* PHP 5.3+ is really highly recommended, see "Known issues"
* This plugin does **not** kick in right after activation. You have to adjust the setting in Settings -> WP-FFPC and save the settings.*
* PHP 5.3+ is really highly recommended, see "Known issues"
= Known issues =
* errors will not be displayed on the admin section if PHP < 5.3, only in the logs. This is due to the limitations of displaying the errors ( admin_notices is a hook, not a filter ) and due to the lack of proper anonymus functions in older PHP. PHP 5.3 is 5 years old, so it's time to upgrade.
* APC with PHP 5.4 is buggy; the plugin with that setup can even make your site slower. Please use APCu or memcached if you're using PHP >= 5.4
* errors will not be displayed on the admin section if PHP < 5.3, only in the logs. This is due to the limitations of displaying the errors ( admin_notices is a hook, not a filter ) and due to the lack of proper anonymus functions in older PHP.
* **If you're using PHP 5.4+ avoid the APC backend: the plugin with that setup can even make your site slower.** Please use APCu or memcached in this case.
= Features: =
* Wordpress Network support
* fully supported domain/subdomain based WordPress Networks on per site setup as well
* will work in Network Enabled mode only for subdirectory based Multisites ( per site settings will not work in this case )
* supports various backends
* various backends
* memcached with [PHP Memcached](http://php.net/manual/en/book.memcached.php "Memcached")
* memcached with [PHP Memcache](http://php.net/manual/en/book.memcache.php "Memcache")
* [APC](http://php.net/manual/en/book.apc.php "APC")
* [APCu](http://pecl.php.net/package/APCu "APC User Cache")
* [Xcache](http://xcache.lighttpd.net/ "Xcache") - not stable yet, volunteer testers required!
* cache exclude options ( home, feeds, archieves, pages, singles; regex based url exclusion )
* cache exclude options ( home, feeds, archives, pages, singles; regex based url exclusion )
* minor Woocommerce support
* (optional) cache for logged-in users
* 404 caching
* canonical redirects caching
* Last Modified HTTP header support ( for 304 responses )
* Last Modified HTTP header support (for 304 responses)
* shortlink HTTP header preservation
* pingback HTTP header preservation
* talkative log for [WP_DEBUG](http://codex.wordpress.org/WP_DEBUG "WP_DEBUG")
* multiple memcached upstream support
* precache ( manually or by timed by wp-cron )
* varying expiration time for posts, taxonomies and home
* (**warning**: untested since WordPress 3.8) Wordpress Network support
* fully supported domain/subdomain based WordPress Networks on per site setup as well
* will work in Network Enabled mode only for subdirectory based Multisites ( per site settings will not work in this case )
Many thanks for donations, contributors, supporters, testers & bug reporters:
* [Harold Kyle](https://github.com/haroldkyle)
* [Eric Gilette](http://www.ericgillette.com/)
* [doconeill](http://wordpress.org/support/profile/doconeill)
* Mark Costlow
* Jason Miller
* [Dave Clark](https://github.com/dkcwd)
* Miguel Clara
* [Anton Pelešev](https://github.com/plescheff)
* Firas Dib
* [CotswoldPhoto](http://wordpress.org/support/profile/cotswoldphoto)
* [tamagokun](https://github.com/tamagokun)
* Many Ayromlou
* mailgarant.nl
* Christian Rößner
* [Ameir Abdeldayem](https://github.com/ameir)
* [Alvaro Gonzalez](https://github.com/andor-pierdelacabeza)
* Meint Post
* Knut Sparhell
* Christian Kernbeis
* Gausden Barry
* Maksim Bukreyeu
* Lissome Hong Kong Limited
* [Gabriele Lauricella](https://github.com/gablau)
* 7th Veil, LLC
* Julia Harsch
* Grant Berntsen
* [Glaydston Veloso](https://github.com/glaydston)
Harold Kyle, Eric Gilette, doconeill, Mark Costlow, Jason Miller, Dave Clark, Miguel Clara, Anton Pelešev, Firas Dib, CotswoldPhoto, tamagokun, Many Ayromlou, mailgarant.nl, Christian Rößner, Ameir Abdeldayem, Alvaro Gonzalez, Meint Post, Knut Sparhell, Christian Kernbeis, Gausden Barry, Maksim Bukreyeu, Lissome Hong Kong Limited, Gabriele Lauricella, 7th Veil, LLC, Julia Harsch, Grant Berntsen, Jorgen Ilstad, Cinema Minima for Movie Makers Worldwide
== Installation ==
@ -103,22 +83,27 @@ A short configuration example is generated on the plugin settings page, under `N
== Frequently Asked Questions ==
= How to use the plugin on Amazon Linux? =
You have to remove the default yum package, named `php-pecl-memcache` and install `Memcached` through PECL.
= The plugin is not working! =
= How to use the plugin in a WordPress Network =
From version 1.0, the plugin supports subdomain based WordPress Network with possible different per site cache settings. If the plugin is network active, obviously the network wide settings will be used for all of the sites. If it's activated only on some of the sites, the other will not be affected and even the cache storage backend can be different from site to site.
Did you save the settings as mentioned in this document?
Do you have at lest one supported backend?
= How logging works in the plugin? =
Log levels by default ( if logging enabled ) includes warning and error level standard PHP messages.
Additional info level log is available when [WP_DEBUG](http://codex.wordpress.org/WP_DEBUG "WP_DEBUG") is enabled.
= It's making my site slower than it was! =
= How can I contribute? =
In order to make contributions a lot easier, I've moved the plugin development to [GitHub](https://github.com/petermolnar/wp-ffpc "GitHub"), feel free to fork and put shiny, new things in it and get in touch with me [hello@petermolnar.eu](mailto:hello@petermolnar.eu "hello@petermolnar.eu") when you have it ready.
So far this only happened if PHP 5.4 or higher was used with APC.
Please avoid this setup; PHP 5.4 shipped opcache and APC is full of bugs since then. Use APCu with PHP 5.4+.
= Does it support mobile theme switching? =
No, it doesn't, and with the way it's currently working, it never will.
WP-FFPC is using the URL as key for caching, so it can't differentiate if there is no change in the URL.
*(I personally also disagree with separation of mobile and non-mobile theme; you need to support a plethora of screen sizes and resolutions, so just use responsive designs instead of splitted logics.)*
= Can you please add '(insert shiny new feature here)'? =
Sure. Send me a code and a pull request on [WP FFPC @ Github](https://github.com/petermolnar/wp-ffpc).
Unfortunately I don't have the resources to code it myself, but there are plenty of WordPress developers who would probably do it for a minor fee.
= Where can I turn for support? =
I provide support for the plugin as best as I can, but it comes without guarantee.
Please post feature requests to [WP-FFPC feature request topic](http://wordpress.org/support/topic/feature-requests-14 "WP-FFPC feature request topic") and any questions on the forum.
== Screenshots ==
@ -136,18 +121,21 @@ Version numbering logic:
* every .B version indicates new features.
* every ..C indicates bugfixes for A.B version.
= 1.12.0 =
*2016-11-09*
= 1.11.2 =
*2017-02-08*
* Add new class to detect mobile devices
* Create a cache to mobile and desktop version
* annoying typos in text
= 1.11.1 =
*2016-04-21*
*2017-02-08*
* exclude cache for WooCommerce
* fix load textdomain
* add Italian (it_IT) translation
* nonexistent redis support removed (it never got to a usable stable state, mostly due to the chaos with the redis php modules)
* readme cleaned up for development hibernation
* donation link removed
* WP version compatibility bumped
= 1.11.0 =
*2016-01-15*
@ -599,4 +587,4 @@ There are major problems with the "memcache" driver, the source is yet unkown. T
= 0.1 =
*2012-02-16*
* first public release
* first public release

View file

@ -227,7 +227,7 @@ abstract class WP_FFPC_ABSTRACT {
* callback function to add settings link to plugins page
*
* @param array $links Current links to add ours to
* @return array $links Current links
*
*/
public function plugin_settings_link ( $links ) {
$settings_link = '<a href="' . $this->settings_link . '">' . __translate__( 'Settings', 'wp-ffpc') . '</a>';
@ -359,7 +359,7 @@ abstract class WP_FFPC_ABSTRACT {
*
* @param mixed $var Variable to dump
* @param boolean $ret Return text instead of printing if true
* @return mixed $var Variable to dump
*
*/
protected function print_var ( $var , $ret = false ) {
if ( @is_array ( $var ) || @is_object( $var ) || @is_bool( $var ) )
@ -401,7 +401,7 @@ abstract class WP_FFPC_ABSTRACT {
* @param $print
* boolean: is true, the options will be printed, otherwise the string will be returned
*
* @return mixed
* @return
* prints or returns the options string
*
*/
@ -594,9 +594,9 @@ abstract class WP_FFPC_ABSTRACT {
* display formatted alert message
*
* @param string $msg Error message
* @param mixed $level "level" of error
* @param string $error "level" of error
* @param boolean $network WordPress network or not, DEPRECATED
* @return mixed
*
*/
static public function alert ( $msg, $level=LOG_WARNING, $network=false ) {
if ( empty($msg)) return false;

View file

@ -70,7 +70,7 @@ else {
}
/* no cache for WooCommerce URL patterns */
if ( isset($wp_ffpc_config['nocache_woocommerce']) && !empty($wp_ffpc_config['nocache_woocommerce']) &&
if ( isset($wp_ffpc_config['nocache_woocommerce']) && !empty($wp_ffpc_config['nocache_woocommerce']) &&
isset($wp_ffpc_config['nocache_woocommerce_url']) && trim($wp_ffpc_config['nocache_woocommerce_url']) ) {
$pattern = sprintf('#%s#', trim($wp_ffpc_config['nocache_woocommerce_url']));
if ( preg_match($pattern, $wp_ffpc_uri) ) {
@ -145,21 +145,7 @@ if ( $wp_ffpc_backend->status() === false ) {
}
/* try to get data & meta keys for current page */
/* include the mobile detect */
include_once ('backends/mobile-detect.php');
$mobile_detect = new Mobile_Detect;
$wp_ffpc_keys = array();
/* verify if mobile device (phones or tablets). */
if($mobile_detect->isMobile()){
__wp_ffpc_debug__('Set the ffpc keys to the mobile version');
$wp_ffpc_keys = array ( 'meta' => $wp_ffpc_config['prefix_meta_mobile'], 'data' => $wp_ffpc_config['prefix_data_mobile'] );
} else {
__wp_ffpc_debug__('Set the ffpc keys to the desktop version');
$wp_ffpc_keys = array( 'meta' => $wp_ffpc_config['prefix_meta'], 'data' => $wp_ffpc_config['prefix_data'] );
}
$wp_ffpc_keys = array ( 'meta' => $wp_ffpc_config['prefix_meta'], 'data' => $wp_ffpc_config['prefix_data'] );
$wp_ffpc_values = array();
__wp_ffpc_debug__ ( "Trying to fetch entries");
@ -273,7 +259,7 @@ if ( isset($wp_ffpc_config['generate_time']) && $wp_ffpc_config['generate_time']
$mtime = explode ( " ", microtime() );
$wp_ffpc_gentime = ( $mtime[1] + $mtime[0] ) - $wp_ffpc_gentime;
$insertion = "\n<!-- \n\tCache Engine: ". $wp_ffpc_config['cache_type'] ."\n\tDate: ". date( 'c' ) . " -->\n";
$insertion = "\n<!-- WP-FFPC cache output stats\n\tcache engine: ". $wp_ffpc_config['cache_type'] ."\n\tUNIX timestamp: ". time() . "\n\tdate: ". date( 'c' ) . "\n\tfrom server: ". $_SERVER['SERVER_ADDR'] . " -->\n";
$index = stripos( $wp_ffpc_values['data'] , '</body>' );
$wp_ffpc_values['data'] = substr_replace( $wp_ffpc_values['data'], $insertion, $index, 0);
@ -323,8 +309,6 @@ function wp_ffpc_callback( $buffer ) {
global $wp_ffpc_backend;
/* check is it's a redirect */
global $wp_ffpc_redirect;
/* check is it's a mobile version*/
global $mobile_detect;
/* no is_home = error, WordPress functions are not availabe */
if (!function_exists('is_home'))
@ -474,15 +458,10 @@ function wp_ffpc_callback( $buffer ) {
/* add generation info is option is set, but only to HTML */
if ( $wp_ffpc_config['generate_time'] == '1' && stripos($buffer, '</body>') ) {
global $wp_ffpc_gentime;
/* verify the device type to output into the generation stats */
$device_type = $mobile_detect -> isMobile() ? 'mobile': 'desktop';
__wp_ffpc_debug__('The device type is: ' . $device_type);
$mtime = explode ( " ", microtime() );
$wp_ffpc_gentime = ( $mtime[1] + $mtime[0] )- $wp_ffpc_gentime;
$insertion = "\n<!-- WP-FFPC cache generation stats" . "\n\tgeneration time: ". round( $wp_ffpc_gentime, 3 ) ." seconds\n\tgeneraton UNIX timestamp: ". time() . "\n\tgeneraton date: ". date( 'c' ) . "\n\tDevice Type: " . $device_type . "\n\tgenerator server: ". $_SERVER['SERVER_ADDR'] . " -->\n";
$insertion = "\n<!-- WP-FFPC cache generation stats" . "\n\tgeneration time: ". round( $wp_ffpc_gentime, 3 ) ." seconds\n\tgeneraton UNIX timestamp: ". time() . "\n\tgeneraton date: ". date( 'c' ) . "\n\tgenerator server: ". $_SERVER['SERVER_ADDR'] . " -->\n";
$index = stripos( $buffer , '</body>' );
$to_store = substr_replace( $buffer, $insertion, $index, 0);
@ -501,10 +480,10 @@ function wp_ffpc_callback( $buffer ) {
*/
$to_store = apply_filters( 'wp-ffpc-to-store', $to_store );
$prefix_meta = ($mobile_detect -> isMobile())? $wp_ffpc_backend->key ( $wp_ffpc_config['prefix_meta_mobile'] ): $wp_ffpc_backend->key ( $wp_ffpc_config['prefix_meta'] );
$prefix_meta = $wp_ffpc_backend->key ( $wp_ffpc_config['prefix_meta'] );
$wp_ffpc_backend->set ( $prefix_meta, $meta );
$prefix_data = ($mobile_detect -> isMobile())? $wp_ffpc_backend->key ( $wp_ffpc_config['prefix_data_mobile'] ): $wp_ffpc_backend->key ( $wp_ffpc_config['prefix_data'] );
$prefix_data = $wp_ffpc_backend->key ( $wp_ffpc_config['prefix_data'] );
$wp_ffpc_backend->set ( $prefix_data , $to_store );
if ( !empty( $meta['status'] ) && $meta['status'] == 404 ) {

File diff suppressed because it is too large Load diff

View file

@ -3,72 +3,70 @@
Plugin Name: WP-FFPC
Plugin URI: https://github.com/petermolnar/wp-ffpc
Description: WordPress in-memory full page cache plugin
Version: 1.12.0
Version: 1.11.2
Author: Peter Molnar <hello@petermolnar.eu>
Author URI: http://petermolnar.eu/
Author URI: http://petermolnar.net/
License: GPLv3
Text Domain: wp-ffpc
Domain Path: /languages/
*/
/* Copyright 2010-2014 Peter Molnar ( hello@petermolnar.eu )
/*Copyright 2010-2017 Peter Molnar ( hello@petermolnar.eu )
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 3, as
published by the Free Software Foundation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 3, as
published by the Free Software Foundation.
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.
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, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA02110-1301USA
*/
defined('ABSPATH') or die("Walk away.");
include_once ( 'wp-ffpc-class.php' );
$wp_ffpc_defaults = array (
'hosts'=>'127.0.0.1:11211',
'memcached_binary' => false,
'authpass' => '',
'authuser' => '',
'browsercache' => 0,
'browsercache_home' => 0,
'browsercache_taxonomy' => 0,
'expire' => 300,
'expire_home' => 300,
'expire_taxonomy' => 300,
'invalidation_method' => 0,
'prefix_meta' => 'meta-',
'prefix_meta_mobile' => 'meta-mobile-',
'prefix_data' => 'data-',
'prefix_data_mobile' => 'data-mobile-',
'charset' => 'utf-8',
'log' => true,
'cache_type' => 'memcached',
'cache_loggedin' => false,
'nocache_home' => false,
'nocache_feed' => false,
'nocache_archive' => false,
'nocache_single' => false,
'nocache_page' => false,
'nocache_cookies' => false,
'nocache_dyn' => true,
'nocache_woocommerce' => true,
'nocache_woocommerce_url' => '',
'nocache_url' => '^/wp-',
'nocache_comment' => '',
'response_header' => false,
'generate_time' => false,
'precache_schedule' => 'null',
'key' => '$scheme://$host$request_uri',
'comments_invalidate' => true,
'pingback_header' => false,
'hashkey' => false,
$wp_ffpc_defaults= array (
'hosts' => '127.0.0.1:11211',
'memcached_binary' => false,
'authpass' => '',
'authuser' => '',
'browsercache' => 0,
'browsercache_home' => 0,
'browsercache_taxonomy' => 0,
'expire' => 300,
'expire_home' => 300,
'expire_taxonomy' => 300,
'invalidation_method' => 0,
'prefix_meta' => 'meta-',
'prefix_data' => 'data-',
'charset' => 'utf-8',
'log' => true,
'cache_type' => 'memcached',
'cache_loggedin' => false,
'nocache_home' => false,
'nocache_feed' => false,
'nocache_archive' => false,
'nocache_single' => false,
'nocache_page' => false,
'nocache_cookies' => false,
'nocache_dyn' => true,
'nocache_woocommerce' => true,
'nocache_woocommerce_url' => '',
'nocache_url' => '^/wp-',
'nocache_comment' => '',
'response_header' => false,
'generate_time' => false,
'precache_schedule' => 'null',
'key' => '$scheme://$host$request_uri',
'comments_invalidate' => true,
'pingback_header' => false,
'hashkey' => false,
);
$wp_ffpc = new WP_FFPC ( 'wp-ffpc', '1.12.0', 'WP-FFPC', $wp_ffpc_defaults, 'PeterMolnar_WordPressPlugins_wp-ffpc_HU' , 'WP-FFPC' , 'FA3NT7XDVHPWU' );
$wp_ffpc= new WP_FFPC ( 'wp-ffpc', '1.11.2', 'WP-FFPC', $wp_ffpc_defaults );