Changeset 1268264
- Timestamp:
- 10/18/2015 05:34:57 PM (10 years ago)
- Location:
- wp-ffpc
- Files:
-
- 1 deleted
- 13 edited
- 12 copied
-
tags/1.9.1 (copied) (copied from wp-ffpc/trunk)
-
tags/1.9.1/backends (copied) (copied from wp-ffpc/trunk/backends)
-
tags/1.9.1/backends/apc.php (modified) (3 diffs)
-
tags/1.9.1/backends/apcu.php (modified) (3 diffs)
-
tags/1.9.1/backends/memcache.php (modified) (7 diffs)
-
tags/1.9.1/backends/memcached.php (modified) (8 diffs)
-
tags/1.9.1/composer.json (copied) (copied from wp-ffpc/trunk/composer.json)
-
tags/1.9.1/readme.txt (copied) (copied from wp-ffpc/trunk/readme.txt) (2 diffs)
-
tags/1.9.1/uninstall.php (copied) (copied from wp-ffpc/trunk/uninstall.php)
-
tags/1.9.1/wp-admin.css (copied) (copied from wp-ffpc/trunk/wp-admin.css)
-
tags/1.9.1/wp-common (deleted)
-
tags/1.9.1/wp-ffpc-abstract.php (copied) (copied from wp-ffpc/trunk/wp-ffpc-abstract.php) (1 diff)
-
tags/1.9.1/wp-ffpc-acache.php (copied) (copied from wp-ffpc/trunk/wp-ffpc-acache.php)
-
tags/1.9.1/wp-ffpc-backend.php (copied) (copied from wp-ffpc/trunk/wp-ffpc-backend.php) (2 diffs)
-
tags/1.9.1/wp-ffpc-class.php (copied) (copied from wp-ffpc/trunk/wp-ffpc-class.php) (5 diffs)
-
tags/1.9.1/wp-ffpc-nginx-sample.conf (copied) (copied from wp-ffpc/trunk/wp-ffpc-nginx-sample.conf)
-
tags/1.9.1/wp-ffpc.php (copied) (copied from wp-ffpc/trunk/wp-ffpc.php) (1 diff)
-
trunk/backends/apc.php (modified) (3 diffs)
-
trunk/backends/apcu.php (modified) (3 diffs)
-
trunk/backends/memcache.php (modified) (7 diffs)
-
trunk/backends/memcached.php (modified) (8 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/wp-ffpc-abstract.php (modified) (1 diff)
-
trunk/wp-ffpc-backend.php (modified) (2 diffs)
-
trunk/wp-ffpc-class.php (modified) (5 diffs)
-
trunk/wp-ffpc.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wp-ffpc/tags/1.9.1/backends/apc.php
r1264760 r1268264 11 11 /* verify apc functions exist, apc extension is loaded */ 12 12 if ( ! function_exists( 'apc_cache_info' ) ) { 13 $this->log ( __translate__('APC extension missing', $this->plugin_constant) );13 $this->log ( __translate__('APC extension missing', 'wp-ffpc' ) ); 14 14 return false; 15 15 } … … 17 17 /* verify apc is working */ 18 18 if ( apc_cache_info("user",true) ) { 19 $this->log ( __translate__('backend OK', $this->plugin_constant) );19 $this->log ( __translate__('backend OK', 'wp-ffpc' ) ); 20 20 $this->alive = true; 21 21 } … … 80 80 foreach ( $keys as $key => $dummy ) { 81 81 if ( ! apc_delete ( $key ) ) { 82 $this->log ( sprintf( __translate__( 'Failed to delete APC entry: %s', $this->plugin_constant), $key ), LOG_WARNING );82 $this->log ( sprintf( __translate__( 'Failed to delete APC entry: %s', 'wp-ffpc' ), $key ), LOG_WARNING ); 83 83 //throw new Exception ( __translate__('Deleting APC entry failed with key ', $this->plugin_constant ) . $key ); 84 84 } 85 85 else { 86 $this->log ( sprintf( __translate__( 'APC entry delete: %s', $this->plugin_constant), $key ) );86 $this->log ( sprintf( __translate__( 'APC entry delete: %s', 'wp-ffpc' ), $key ) ); 87 87 } 88 88 } -
wp-ffpc/tags/1.9.1/backends/apcu.php
r1264760 r1268264 11 11 /* verify apcu functions exist, apcu extension is loaded */ 12 12 if ( ! function_exists( 'apcu_cache_info' ) ) { 13 $this->log ( __translate__('APCu extension missing', $this->plugin_constant) );13 $this->log ( __translate__('APCu extension missing', 'wp-ffpc' ) ); 14 14 return false; 15 15 } … … 17 17 /* verify apcu is working */ 18 18 if ( @apcu_cache_info("user") != false ) { 19 $this->log ( __translate__('backend OK', $this->plugin_constant) );19 $this->log ( __translate__('backend OK', 'wp-ffpc' ) ); 20 20 $this->alive = true; 21 21 } … … 80 80 foreach ( $keys as $key => $dummy ) { 81 81 if ( ! apcu_delete ( $key ) ) { 82 $this->log ( sprintf( __translate__( 'Failed to delete APC entry: %s', $this->plugin_constant), $key ), LOG_WARNING );83 //throw new Exception ( __translate__('Deleting APC entry failed with key ', $this->plugin_constant) . $key );82 $this->log ( sprintf( __translate__( 'Failed to delete APC entry: %s', 'wp-ffpc' ), $key ), LOG_WARNING ); 83 //throw new Exception ( __translate__('Deleting APC entry failed with key ', 'wp-ffpc' ) . $key ); 84 84 } 85 85 else { 86 $this->log ( sprintf( __translate__( 'APC entry delete: %s', $this->plugin_constant), $key ) );86 $this->log ( sprintf( __translate__( 'APC entry delete: %s', 'wp-ffpc' ), $key ) ); 87 87 } 88 88 } -
wp-ffpc/tags/1.9.1/backends/memcache.php
r1264760 r1268264 10 10 /* Memcached class does not exist, Memcache extension is not available */ 11 11 if (!class_exists('Memcache')) { 12 $this->log ( __translate__('PHP Memcache extension missing', $this->plugin_constant), LOG_WARNING );12 $this->log ( __translate__('PHP Memcache extension missing', 'wp-ffpc' ), LOG_WARNING ); 13 13 return false; 14 14 } … … 16 16 /* check for existing server list, otherwise we cannot add backends */ 17 17 if ( empty ( $this->options['servers'] ) && ! $this->alive ) { 18 $this->log ( __translate__("servers list is empty, init failed", $this->plugin_constant), LOG_WARNING );18 $this->log ( __translate__("servers list is empty, init failed", 'wp-ffpc' ), LOG_WARNING ); 19 19 return false; 20 20 } … … 26 26 /* check if initialization was success or not */ 27 27 if ( $this->connection === NULL ) { 28 $this->log ( __translate__( 'error initializing Memcache PHP extension, exiting', $this->plugin_constant) );28 $this->log ( __translate__( 'error initializing Memcache PHP extension, exiting', 'wp-ffpc' ) ); 29 29 return false; 30 30 } … … 38 38 $this->status[$server_id] = $this->connection->connect ( $server['host'] , $server['port'] ); 39 39 40 $this->log ( sprintf( __translate__( '%s added', $this->plugin_constant), $server_id ) );40 $this->log ( sprintf( __translate__( '%s added', 'wp-ffpc' ), $server_id ) ); 41 41 } 42 42 … … 52 52 protected function _status () { 53 53 /* server status will be calculated by getting server stats */ 54 $this->log ( __translate__("checking server statuses", $this->plugin_constant));54 $this->log ( __translate__("checking server statuses", 'wp-ffpc' )); 55 55 /* get servers statistic from connection */ 56 56 foreach ( $this->options['servers'] as $server_id => $server ) { … … 60 60 $this->status[$server_id] = $this->connection->getServerStatus( $server['host'], $server['port'] ); 61 61 if ( $this->status[$server_id] == 0 ) 62 $this->log ( sprintf( __translate__( '%s server is down', $this->plugin_constant), $server_id ) );62 $this->log ( sprintf( __translate__( '%s server is down', 'wp-ffpc' ), $server_id ) ); 63 63 else 64 $this->log ( sprintf( __translate__( '%s server is up & running', $this->plugin_constant), $server_id ) );64 $this->log ( sprintf( __translate__( '%s server is up & running', 'wp-ffpc' ), $server_id ) ); 65 65 } 66 66 } … … 111 111 112 112 if ( $kresult === false ) { 113 $this->log ( sprintf( __translate__( 'unable to delete entry: %s', $this->plugin_constant), $key ) );113 $this->log ( sprintf( __translate__( 'unable to delete entry: %s', 'wp-ffpc' ), $key ) ); 114 114 } 115 115 else { 116 $this->log ( sprintf( __translate__( 'entry deleted: %s', $this->plugin_constant), $key ) );116 $this->log ( sprintf( __translate__( 'entry deleted: %s', 'wp-ffpc' ), $key ) ); 117 117 } 118 118 } -
wp-ffpc/tags/1.9.1/backends/memcached.php
r1264760 r1268264 8 8 /* Memcached class does not exist, Memcached extension is not available */ 9 9 if (!class_exists('Memcached')) { 10 $this->log ( __translate__(' Memcached extension missing, wp-ffpc will not be able to function correctly!', $this->plugin_constant), LOG_WARNING );10 $this->log ( __translate__(' Memcached extension missing, wp-ffpc will not be able to function correctly!', 'wp-ffpc' ), LOG_WARNING ); 11 11 return false; 12 12 } … … 14 14 /* check for existing server list, otherwise we cannot add backends */ 15 15 if ( empty ( $this->options['servers'] ) && ! $this->alive ) { 16 $this->log ( __translate__("Memcached servers list is empty, init failed", $this->plugin_constant), LOG_WARNING );16 $this->log ( __translate__("Memcached servers list is empty, init failed", 'wp-ffpc' ), LOG_WARNING ); 17 17 return false; 18 18 } … … 35 35 /* check if initialization was success or not */ 36 36 if ( $this->connection === NULL ) { 37 $this->log ( __translate__( 'error initializing Memcached PHP extension, exiting', $this->plugin_constant) );37 $this->log ( __translate__( 'error initializing Memcached PHP extension, exiting', 'wp-ffpc' ) ); 38 38 return false; 39 39 } … … 60 60 if ( !@array_key_exists($server_id , $servers_alive ) ) { 61 61 $this->connection->addServer( $server['host'], $server['port'] ); 62 $this->log ( sprintf( __translate__( '%s added', $this->plugin_constant), $server_id ) );62 $this->log ( sprintf( __translate__( '%s added', 'wp-ffpc' ), $server_id ) ); 63 63 } 64 64 } … … 75 75 protected function _status () { 76 76 /* server status will be calculated by getting server stats */ 77 $this->log ( __translate__("checking server statuses", $this->plugin_constant));77 $this->log ( __translate__("checking server statuses", 'wp-ffpc' )); 78 78 /* get server list from connection */ 79 79 $servers = $this->connection->getServerList(); … … 83 83 /* reset server status to offline */ 84 84 $this->status[$server_id] = 0; 85 if ($this->connection->set( $this->plugin_constant, time())) {86 $this->log ( sprintf( __translate__( '%s server is up & running', $this->plugin_constant), $server_id ) );85 if ($this->connection->set('wp-ffpc', time())) { 86 $this->log ( sprintf( __translate__( '%s server is up & running', 'wp-ffpc' ), $server_id ) ); 87 87 $this->status[$server_id] = 1; 88 88 } … … 114 114 if ( $result === false ) { 115 115 $code = $this->connection->getResultCode(); 116 $this->log ( sprintf( __translate__( 'unable to set entry: %s', $this->plugin_constant), $key ) );117 $this->log ( sprintf( __translate__( 'Memcached error code: %s', $this->plugin_constant), $code ) );118 //throw new Exception ( __translate__('Unable to store Memcached entry ', $this->plugin_constant ) . $key . __translate__( ', error code: ', $this->plugin_constant) . $code );116 $this->log ( sprintf( __translate__( 'unable to set entry: %s', 'wp-ffpc' ), $key ) ); 117 $this->log ( sprintf( __translate__( 'Memcached error code: %s', 'wp-ffpc' ), $code ) ); 118 //throw new Exception ( __translate__('Unable to store Memcached entry ', 'wp-ffpc' ) . $key . __translate__( ', error code: ', 'wp-ffpc' ) . $code ); 119 119 } 120 120 … … 147 147 if ( $kresult === false ) { 148 148 $code = $this->connection->getResultCode(); 149 $this->log ( sprintf( __translate__( 'unable to delete entry: %s', $this->plugin_constant), $key ) );150 $this->log ( sprintf( __translate__( 'Memcached error code: %s', $this->plugin_constant), $code ) );149 $this->log ( sprintf( __translate__( 'unable to delete entry: %s', 'wp-ffpc' ), $key ) ); 150 $this->log ( sprintf( __translate__( 'Memcached error code: %s', 'wp-ffpc' ), $code ) ); 151 151 } 152 152 else { 153 $this->log ( sprintf( __translate__( 'entry deleted: %s', $this->plugin_constant), $key ) );153 $this->log ( sprintf( __translate__( 'entry deleted: %s', 'wp-ffpc' ), $key ) ); 154 154 } 155 155 } -
wp-ffpc/tags/1.9.1/readme.txt
r1266062 r1268264 5 5 Requires at least: 3.0 6 6 Tested up to: 4.3.1 7 Stable tag: 1.9. 07 Stable tag: 1.9.1 8 8 License: GPLv3 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 129 129 * every ..C indicates bugfixes for A.B version. 130 130 131 = 1.9.1 = 132 *2015-10-18* 133 134 * bugfix for is_writable check failures ( see: https://wordpress.org/support/topic/settings-saved-but-getting-not-saved-error-message) 135 * bugfix for memcached.protocol notice 136 * typo fixes 137 * replace variable with string constant in translatable messages 138 131 139 = 1.9.0 = 132 140 *2015-10-14* -
wp-ffpc/tags/1.9.1/wp-ffpc-abstract.php
r1266062 r1268264 8 8 else { 9 9 function __translate__ ( $text, $domain ) { return $text; } 10 } 11 } 12 13 if ( !function_exists ('__debug__') ) { 14 /* __ only availabe if we're running from the inside of wordpress, not in advanced-cache.php phase */ 15 function __debug__ ( $text ) { 16 if ( defined('WP_FFPC__DEBUG_MODE') && WP_FFPC__DEBUG_MODE == true) 17 error_log ( __FILE__ . ': ' . $text ); 10 18 } 11 19 } -
wp-ffpc/tags/1.9.1/wp-ffpc-backend.php
r1266062 r1268264 23 23 const port_separator = ':'; 24 24 25 protected $plugin_constant = 'wp-ffpc';26 25 protected $connection = NULL; 27 26 protected $alive = false; … … 243 242 244 243 /* proxy to internal function */ 245 $ internal= $this->_flush();244 $result = $this->_flush(); 246 245 247 246 if ( $result === false ) -
wp-ffpc/tags/1.9.1/wp-ffpc-class.php
r1266062 r1268264 68 68 */ 69 69 public function plugin_post_construct () { 70 static::debug ( __CLASS__, 'post_construct' ); 70 71 $this->plugin_url = plugin_dir_url( __FILE__ ); 71 72 $this->plugin_dir = plugin_dir_path( __FILE__ ); … … 79 80 */ 80 81 public function plugin_pre_init() { 82 static::debug ( __CLASS__, 'pre_init' ); 81 83 /* advanced cache "worker" file */ 82 84 $this->acache_worker = $this->plugin_dir . $this->plugin_constant . '-acache.php'; … … 243 245 if ( extension_loaded ( 'memcache' ) ) { 244 246 $memcache_settings = ini_get_all( 'memcache' ); 245 if ( !empty ( $memcache_settings ) && $this->options['cache_type'] == 'memcache' )247 if ( !empty ( $memcache_settings ) && $this->options['cache_type'] == 'memcache' && isset($memcache_settings['memcache.protocol']) ) 246 248 { 247 249 $memcache_protocol = strtolower($memcache_settings['memcache.protocol']['local_value']); … … 1001 1003 private function deploy_advanced_cache( ) { 1002 1004 1003 if ( !is_writable( $this->acache)) {1005 if (!touch($this->acache)) { 1004 1006 error_log('Generating advanced-cache.php failed: '.$this->acache.' is not writable'); 1005 1007 return false; … … 1011 1013 return false; 1012 1014 } 1015 1013 1016 1014 1017 /* add the required includes and generate the needed code */ -
wp-ffpc/tags/1.9.1/wp-ffpc.php
r1266062 r1268264 4 4 Plugin URI: https://github.com/petermolnar/wp-ffpc 5 5 Description: WordPress in-memory full page cache plugin 6 Version: 1.9. 06 Version: 1.9.1 7 7 Author: Peter Molnar <hello@petermolnar.eu> 8 8 Author URI: http://petermolnar.eu/ -
wp-ffpc/trunk/backends/apc.php
r1264760 r1268264 11 11 /* verify apc functions exist, apc extension is loaded */ 12 12 if ( ! function_exists( 'apc_cache_info' ) ) { 13 $this->log ( __translate__('APC extension missing', $this->plugin_constant) );13 $this->log ( __translate__('APC extension missing', 'wp-ffpc' ) ); 14 14 return false; 15 15 } … … 17 17 /* verify apc is working */ 18 18 if ( apc_cache_info("user",true) ) { 19 $this->log ( __translate__('backend OK', $this->plugin_constant) );19 $this->log ( __translate__('backend OK', 'wp-ffpc' ) ); 20 20 $this->alive = true; 21 21 } … … 80 80 foreach ( $keys as $key => $dummy ) { 81 81 if ( ! apc_delete ( $key ) ) { 82 $this->log ( sprintf( __translate__( 'Failed to delete APC entry: %s', $this->plugin_constant), $key ), LOG_WARNING );82 $this->log ( sprintf( __translate__( 'Failed to delete APC entry: %s', 'wp-ffpc' ), $key ), LOG_WARNING ); 83 83 //throw new Exception ( __translate__('Deleting APC entry failed with key ', $this->plugin_constant ) . $key ); 84 84 } 85 85 else { 86 $this->log ( sprintf( __translate__( 'APC entry delete: %s', $this->plugin_constant), $key ) );86 $this->log ( sprintf( __translate__( 'APC entry delete: %s', 'wp-ffpc' ), $key ) ); 87 87 } 88 88 } -
wp-ffpc/trunk/backends/apcu.php
r1264760 r1268264 11 11 /* verify apcu functions exist, apcu extension is loaded */ 12 12 if ( ! function_exists( 'apcu_cache_info' ) ) { 13 $this->log ( __translate__('APCu extension missing', $this->plugin_constant) );13 $this->log ( __translate__('APCu extension missing', 'wp-ffpc' ) ); 14 14 return false; 15 15 } … … 17 17 /* verify apcu is working */ 18 18 if ( @apcu_cache_info("user") != false ) { 19 $this->log ( __translate__('backend OK', $this->plugin_constant) );19 $this->log ( __translate__('backend OK', 'wp-ffpc' ) ); 20 20 $this->alive = true; 21 21 } … … 80 80 foreach ( $keys as $key => $dummy ) { 81 81 if ( ! apcu_delete ( $key ) ) { 82 $this->log ( sprintf( __translate__( 'Failed to delete APC entry: %s', $this->plugin_constant), $key ), LOG_WARNING );83 //throw new Exception ( __translate__('Deleting APC entry failed with key ', $this->plugin_constant) . $key );82 $this->log ( sprintf( __translate__( 'Failed to delete APC entry: %s', 'wp-ffpc' ), $key ), LOG_WARNING ); 83 //throw new Exception ( __translate__('Deleting APC entry failed with key ', 'wp-ffpc' ) . $key ); 84 84 } 85 85 else { 86 $this->log ( sprintf( __translate__( 'APC entry delete: %s', $this->plugin_constant), $key ) );86 $this->log ( sprintf( __translate__( 'APC entry delete: %s', 'wp-ffpc' ), $key ) ); 87 87 } 88 88 } -
wp-ffpc/trunk/backends/memcache.php
r1264760 r1268264 10 10 /* Memcached class does not exist, Memcache extension is not available */ 11 11 if (!class_exists('Memcache')) { 12 $this->log ( __translate__('PHP Memcache extension missing', $this->plugin_constant), LOG_WARNING );12 $this->log ( __translate__('PHP Memcache extension missing', 'wp-ffpc' ), LOG_WARNING ); 13 13 return false; 14 14 } … … 16 16 /* check for existing server list, otherwise we cannot add backends */ 17 17 if ( empty ( $this->options['servers'] ) && ! $this->alive ) { 18 $this->log ( __translate__("servers list is empty, init failed", $this->plugin_constant), LOG_WARNING );18 $this->log ( __translate__("servers list is empty, init failed", 'wp-ffpc' ), LOG_WARNING ); 19 19 return false; 20 20 } … … 26 26 /* check if initialization was success or not */ 27 27 if ( $this->connection === NULL ) { 28 $this->log ( __translate__( 'error initializing Memcache PHP extension, exiting', $this->plugin_constant) );28 $this->log ( __translate__( 'error initializing Memcache PHP extension, exiting', 'wp-ffpc' ) ); 29 29 return false; 30 30 } … … 38 38 $this->status[$server_id] = $this->connection->connect ( $server['host'] , $server['port'] ); 39 39 40 $this->log ( sprintf( __translate__( '%s added', $this->plugin_constant), $server_id ) );40 $this->log ( sprintf( __translate__( '%s added', 'wp-ffpc' ), $server_id ) ); 41 41 } 42 42 … … 52 52 protected function _status () { 53 53 /* server status will be calculated by getting server stats */ 54 $this->log ( __translate__("checking server statuses", $this->plugin_constant));54 $this->log ( __translate__("checking server statuses", 'wp-ffpc' )); 55 55 /* get servers statistic from connection */ 56 56 foreach ( $this->options['servers'] as $server_id => $server ) { … … 60 60 $this->status[$server_id] = $this->connection->getServerStatus( $server['host'], $server['port'] ); 61 61 if ( $this->status[$server_id] == 0 ) 62 $this->log ( sprintf( __translate__( '%s server is down', $this->plugin_constant), $server_id ) );62 $this->log ( sprintf( __translate__( '%s server is down', 'wp-ffpc' ), $server_id ) ); 63 63 else 64 $this->log ( sprintf( __translate__( '%s server is up & running', $this->plugin_constant), $server_id ) );64 $this->log ( sprintf( __translate__( '%s server is up & running', 'wp-ffpc' ), $server_id ) ); 65 65 } 66 66 } … … 111 111 112 112 if ( $kresult === false ) { 113 $this->log ( sprintf( __translate__( 'unable to delete entry: %s', $this->plugin_constant), $key ) );113 $this->log ( sprintf( __translate__( 'unable to delete entry: %s', 'wp-ffpc' ), $key ) ); 114 114 } 115 115 else { 116 $this->log ( sprintf( __translate__( 'entry deleted: %s', $this->plugin_constant), $key ) );116 $this->log ( sprintf( __translate__( 'entry deleted: %s', 'wp-ffpc' ), $key ) ); 117 117 } 118 118 } -
wp-ffpc/trunk/backends/memcached.php
r1264760 r1268264 8 8 /* Memcached class does not exist, Memcached extension is not available */ 9 9 if (!class_exists('Memcached')) { 10 $this->log ( __translate__(' Memcached extension missing, wp-ffpc will not be able to function correctly!', $this->plugin_constant), LOG_WARNING );10 $this->log ( __translate__(' Memcached extension missing, wp-ffpc will not be able to function correctly!', 'wp-ffpc' ), LOG_WARNING ); 11 11 return false; 12 12 } … … 14 14 /* check for existing server list, otherwise we cannot add backends */ 15 15 if ( empty ( $this->options['servers'] ) && ! $this->alive ) { 16 $this->log ( __translate__("Memcached servers list is empty, init failed", $this->plugin_constant), LOG_WARNING );16 $this->log ( __translate__("Memcached servers list is empty, init failed", 'wp-ffpc' ), LOG_WARNING ); 17 17 return false; 18 18 } … … 35 35 /* check if initialization was success or not */ 36 36 if ( $this->connection === NULL ) { 37 $this->log ( __translate__( 'error initializing Memcached PHP extension, exiting', $this->plugin_constant) );37 $this->log ( __translate__( 'error initializing Memcached PHP extension, exiting', 'wp-ffpc' ) ); 38 38 return false; 39 39 } … … 60 60 if ( !@array_key_exists($server_id , $servers_alive ) ) { 61 61 $this->connection->addServer( $server['host'], $server['port'] ); 62 $this->log ( sprintf( __translate__( '%s added', $this->plugin_constant), $server_id ) );62 $this->log ( sprintf( __translate__( '%s added', 'wp-ffpc' ), $server_id ) ); 63 63 } 64 64 } … … 75 75 protected function _status () { 76 76 /* server status will be calculated by getting server stats */ 77 $this->log ( __translate__("checking server statuses", $this->plugin_constant));77 $this->log ( __translate__("checking server statuses", 'wp-ffpc' )); 78 78 /* get server list from connection */ 79 79 $servers = $this->connection->getServerList(); … … 83 83 /* reset server status to offline */ 84 84 $this->status[$server_id] = 0; 85 if ($this->connection->set( $this->plugin_constant, time())) {86 $this->log ( sprintf( __translate__( '%s server is up & running', $this->plugin_constant), $server_id ) );85 if ($this->connection->set('wp-ffpc', time())) { 86 $this->log ( sprintf( __translate__( '%s server is up & running', 'wp-ffpc' ), $server_id ) ); 87 87 $this->status[$server_id] = 1; 88 88 } … … 114 114 if ( $result === false ) { 115 115 $code = $this->connection->getResultCode(); 116 $this->log ( sprintf( __translate__( 'unable to set entry: %s', $this->plugin_constant), $key ) );117 $this->log ( sprintf( __translate__( 'Memcached error code: %s', $this->plugin_constant), $code ) );118 //throw new Exception ( __translate__('Unable to store Memcached entry ', $this->plugin_constant ) . $key . __translate__( ', error code: ', $this->plugin_constant) . $code );116 $this->log ( sprintf( __translate__( 'unable to set entry: %s', 'wp-ffpc' ), $key ) ); 117 $this->log ( sprintf( __translate__( 'Memcached error code: %s', 'wp-ffpc' ), $code ) ); 118 //throw new Exception ( __translate__('Unable to store Memcached entry ', 'wp-ffpc' ) . $key . __translate__( ', error code: ', 'wp-ffpc' ) . $code ); 119 119 } 120 120 … … 147 147 if ( $kresult === false ) { 148 148 $code = $this->connection->getResultCode(); 149 $this->log ( sprintf( __translate__( 'unable to delete entry: %s', $this->plugin_constant), $key ) );150 $this->log ( sprintf( __translate__( 'Memcached error code: %s', $this->plugin_constant), $code ) );149 $this->log ( sprintf( __translate__( 'unable to delete entry: %s', 'wp-ffpc' ), $key ) ); 150 $this->log ( sprintf( __translate__( 'Memcached error code: %s', 'wp-ffpc' ), $code ) ); 151 151 } 152 152 else { 153 $this->log ( sprintf( __translate__( 'entry deleted: %s', $this->plugin_constant), $key ) );153 $this->log ( sprintf( __translate__( 'entry deleted: %s', 'wp-ffpc' ), $key ) ); 154 154 } 155 155 } -
wp-ffpc/trunk/readme.txt
r1266062 r1268264 5 5 Requires at least: 3.0 6 6 Tested up to: 4.3.1 7 Stable tag: 1.9. 07 Stable tag: 1.9.1 8 8 License: GPLv3 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 129 129 * every ..C indicates bugfixes for A.B version. 130 130 131 = 1.9.1 = 132 *2015-10-18* 133 134 * bugfix for is_writable check failures ( see: https://wordpress.org/support/topic/settings-saved-but-getting-not-saved-error-message) 135 * bugfix for memcached.protocol notice 136 * typo fixes 137 * replace variable with string constant in translatable messages 138 131 139 = 1.9.0 = 132 140 *2015-10-14* -
wp-ffpc/trunk/wp-ffpc-abstract.php
r1266062 r1268264 8 8 else { 9 9 function __translate__ ( $text, $domain ) { return $text; } 10 } 11 } 12 13 if ( !function_exists ('__debug__') ) { 14 /* __ only availabe if we're running from the inside of wordpress, not in advanced-cache.php phase */ 15 function __debug__ ( $text ) { 16 if ( defined('WP_FFPC__DEBUG_MODE') && WP_FFPC__DEBUG_MODE == true) 17 error_log ( __FILE__ . ': ' . $text ); 10 18 } 11 19 } -
wp-ffpc/trunk/wp-ffpc-backend.php
r1266062 r1268264 23 23 const port_separator = ':'; 24 24 25 protected $plugin_constant = 'wp-ffpc';26 25 protected $connection = NULL; 27 26 protected $alive = false; … … 243 242 244 243 /* proxy to internal function */ 245 $ internal= $this->_flush();244 $result = $this->_flush(); 246 245 247 246 if ( $result === false ) -
wp-ffpc/trunk/wp-ffpc-class.php
r1266062 r1268264 68 68 */ 69 69 public function plugin_post_construct () { 70 static::debug ( __CLASS__, 'post_construct' ); 70 71 $this->plugin_url = plugin_dir_url( __FILE__ ); 71 72 $this->plugin_dir = plugin_dir_path( __FILE__ ); … … 79 80 */ 80 81 public function plugin_pre_init() { 82 static::debug ( __CLASS__, 'pre_init' ); 81 83 /* advanced cache "worker" file */ 82 84 $this->acache_worker = $this->plugin_dir . $this->plugin_constant . '-acache.php'; … … 243 245 if ( extension_loaded ( 'memcache' ) ) { 244 246 $memcache_settings = ini_get_all( 'memcache' ); 245 if ( !empty ( $memcache_settings ) && $this->options['cache_type'] == 'memcache' )247 if ( !empty ( $memcache_settings ) && $this->options['cache_type'] == 'memcache' && isset($memcache_settings['memcache.protocol']) ) 246 248 { 247 249 $memcache_protocol = strtolower($memcache_settings['memcache.protocol']['local_value']); … … 1001 1003 private function deploy_advanced_cache( ) { 1002 1004 1003 if ( !is_writable( $this->acache)) {1005 if (!touch($this->acache)) { 1004 1006 error_log('Generating advanced-cache.php failed: '.$this->acache.' is not writable'); 1005 1007 return false; … … 1011 1013 return false; 1012 1014 } 1015 1013 1016 1014 1017 /* add the required includes and generate the needed code */ -
wp-ffpc/trunk/wp-ffpc.php
r1266062 r1268264 4 4 Plugin URI: https://github.com/petermolnar/wp-ffpc 5 5 Description: WordPress in-memory full page cache plugin 6 Version: 1.9. 06 Version: 1.9.1 7 7 Author: Peter Molnar <hello@petermolnar.eu> 8 8 Author URI: http://petermolnar.eu/
Note: See TracChangeset
for help on using the changeset viewer.