Skip to content
Permalink
Browse files
Merge remote branch 'opengeek/impr-cache' into develop for caching im…
…provements

* opengeek/impr-cache: (46 commits)
  Remove resourceListing, documentListing, and documentMap from context cache
  Additional settings and lexicons for cache refactoring
  Preserve config_options in config file during setup
  Avoid PHP warning from fopen in xPDOFileCache->get()
  Bump version for 2.1.0-pl2
  Mute warnings/errors from fopen/fclose in writeFile()
  Bump version for 2.1.0 release
  Add proper support for cache file formats other than PHP includes
  Add proper cache file locking and format handling
  Add OPT_CACHE_FORMAT constant to xPDO
  Cleanup clearcache output from context_settings
  Allow partition-specific cache expiration settings
  Fix generateActionMap
  Store/re-use parent paths as they are calculated when generating context cache
  Refactor pluginCache generation
  Get rid of aliasListing
  Use modX::$_systemConfig for context settings generation
  Add missing partitions for system/context_settings
  Add CACHE_SERIALIZE format support
  Additional modCacheManager->refresh() refactoring
  ...
  • Loading branch information
Shaun McCormick committed Feb 16, 2011
2 parents 6b6229d + 7a6c892 commit d964b98cad2ffe99f9344c39e62706ce08b787cb
Show file tree
Hide file tree
Showing 62 changed files with 771 additions and 522 deletions.
@@ -150,18 +150,9 @@
'area' => 'caching',
'editedon' => null,
), '', true, true);
$settings['cache_json']= $xpdo->newObject('modSystemSetting');
$settings['cache_json']->fromArray(array (
'key' => 'cache_json',
'value' => '0',
'xtype' => 'combo-boolean',
'namespace' => 'core',
'area' => 'caching',
'editedon' => null,
), '', true, true);
$settings['cache_json_expires']= $xpdo->newObject('modSystemSetting');
$settings['cache_json_expires']->fromArray(array (
'key' => 'cache_json_expires',
$settings['cache_format']= $xpdo->newObject('modSystemSetting');
$settings['cache_format']->fromArray(array (
'key' => 'cache_format',
'value' => '0',
'xtype' => 'textfield',
'namespace' => 'core',
@@ -2,6 +2,9 @@
This file shows the changes in recent releases of MODx. The most current release is usually the
development release, and is only shown to give an idea of what's currently in the pipeline.

- [#3111] Remove resourceListing, documentListing, and documentMap from context cache
- [#3111] Cache refactoring with proper file locking, partitioning, and multiple format support
- [#3111] Update xPDO to release 2.1.0-pl for cache improvements
- [#3740] Add proxy support to modTransportPackage.class.php
- [#3693] Fix reversed content-disposition logic on static resources
- [#3427] Fix issue where User Settings were not respected with filemanager_path/url
@@ -10,6 +10,7 @@ $database_connection_charset = '{database_connection_charset}';
$dbase = '{dbase}';
$table_prefix = '{table_prefix}';
$database_dsn = '{database_dsn}';
$config_options = {config_options};

$lastInstallTime = {last_install_time};

@@ -45,26 +46,26 @@ if (!defined('MODX_BASE_PATH')) {
define('MODX_BASE_URL', $modx_base_url);
}
if(defined('PHP_SAPI') && (PHP_SAPI == "cli" || PHP_SAPI == "embed")) {
$isSecureRequest = false;
$isSecureRequest = false;
} else {
$isSecureRequest = ((isset ($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') || $_SERVER['SERVER_PORT'] == $https_port);
$isSecureRequest = ((isset ($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') || $_SERVER['SERVER_PORT'] == $https_port);
}
if (!defined('MODX_URL_SCHEME')) {
$url_scheme= $isSecureRequest ? 'https://' : 'http://';
define('MODX_URL_SCHEME', $url_scheme);
}
if (!defined('MODX_HTTP_HOST')) {
if(defined('PHP_SAPI') && (PHP_SAPI == "cli" || PHP_SAPI == "embed")) {
$http_host='{http_host}';
define('MODX_HTTP_HOST', $http_host);
} else {
$http_host= $_SERVER['HTTP_HOST'];
if ($_SERVER['SERVER_PORT'] != 80) {
$http_host= str_replace(':' . $_SERVER['SERVER_PORT'], '', $http_host); // remove port from HTTP_HOST
}
$http_host .= ($_SERVER['SERVER_PORT'] == 80 || $isSecureRequest) ? '' : ':' . $_SERVER['SERVER_PORT'];
define('MODX_HTTP_HOST', $http_host);
}
if(defined('PHP_SAPI') && (PHP_SAPI == "cli" || PHP_SAPI == "embed")) {
$http_host='{http_host}';
define('MODX_HTTP_HOST', $http_host);
} else {
$http_host= $_SERVER['HTTP_HOST'];
if ($_SERVER['SERVER_PORT'] != 80) {
$http_host= str_replace(':' . $_SERVER['SERVER_PORT'], '', $http_host); // remove port from HTTP_HOST
}
$http_host .= ($_SERVER['SERVER_PORT'] == 80 || $isSecureRequest) ? '' : ':' . $_SERVER['SERVER_PORT'];
define('MODX_HTTP_HOST', $http_host);
}
}
if (!defined('MODX_SITE_URL')) {
$site_url= $url_scheme . $http_host . MODX_BASE_URL;
@@ -318,7 +318,19 @@
$_lang['quick_update_tv'] = 'Quick Update TV';
$_lang['recent_docs'] = 'Recent documents';
$_lang['redirecting'] = 'Redirecting...';
$_lang['refresh_action_map'] = 'Clearing the Action map cache';
$_lang['refresh_auto_publish'] = 'Processing automatic publishing dates';
$_lang['refresh_context_settings'] = 'Regenerating the context caches';
$_lang['refresh_db'] = 'Clearing the database result set cache';
$_lang['refresh_default'] = 'Clearing the default cache';
$_lang['refresh_failure'] = 'Refresh failed! (NOTE: this cache partition may just be empty)';
$_lang['refresh_lexicon_topics'] = 'Clearing the lexicon topics cache';
$_lang['refresh_menu'] = 'Clearing the menu cache';
$_lang['refresh_published'] = '<strong>[[+num]]</strong> documents were published.';
$_lang['refresh_resource'] = 'Clearing the Resource cache';
$_lang['refresh_scripts'] = 'Clearing the Snippet/Plugin script cache';
$_lang['refresh_success'] = 'Refresh successful!';
$_lang['refresh_system_settings'] = 'Regenerating system settings cache';
$_lang['refresh_title'] = 'Refresh site';
$_lang['refresh_tree'] = 'Refresh tree';
$_lang['refresh_unpublished'] = '<strong>[[+num]]</strong> documents were unpublished.';
@@ -115,14 +115,11 @@
$_lang['setting_cache_disabled_desc'] = 'Select \'Yes\' to disable all MODx caching features. MODx does not recommend disabling caching.';
$_lang['setting_cache_disabled_err'] = 'Please state whether or not you want the cache enabled.';

$_lang['setting_cache_json'] = 'Cache JSON Data';
$_lang['setting_cache_json_desc'] = 'Cache any JSON data sent to and from the manager UI.';

$_lang['setting_cache_expires'] = 'Expiration Time for Default Cache';
$_lang['setting_cache_expires_desc'] = 'This value (in seconds) sets the amount of time cache files last for default caching.';

$_lang['setting_cache_json_expires'] = 'Expiration Time for JSON Cache';
$_lang['setting_cache_json_expires_desc'] = 'This value (in seconds) sets the amount of time cache files last for JSON caching.';
$_lang['setting_cache_format'] = 'Caching Format to Use';
$_lang['setting_cache_format_desc'] = '0 = PHP, 1 = JSON, 2 = serialize. One of the formats';

$_lang['setting_cache_handler'] = 'Caching Handler Class';
$_lang['setting_cache_handler_desc'] = 'The class name of the type handler to use for caching.';

0 comments on commit d964b98

Please sign in to comment.