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
Shaun McCormick committed Feb 16, 2011
2 parents 6b6229d + 7a6c892 commit d964b98cad2ffe99f9344c39e62706ce08b787cb
Showing with 771 additions and 522 deletions.
  1. +3 −12 _build/data/transport.core.system_settings.php
  2. +3 −0 core/docs/changelog.txt
  3. +14 −13 core/docs/config.inc.tpl
  4. +12 −0 core/lexicon/en/default.inc.php
  5. +2 −5 core/lexicon/en/setting.inc.php
  6. +230 −154 core/model/modx/modcachemanager.class.php
  7. +6 −10 core/model/modx/modcontext.class.php
  8. +5 −1 core/model/modx/modlexicon.class.php
  9. +5 −1 core/model/modx/modmanagerrequest.class.php
  10. +5 −2 core/model/modx/modmenu.class.php
  11. +14 −50 core/model/modx/modrequest.class.php
  12. +9 −4 core/model/modx/modscript.class.php
  13. +14 −10 core/model/modx/modx.class.php
  14. +2 −3 core/model/modx/processors/context/remove.php
  15. +3 −2 core/model/modx/processors/element/chunk/create.php
  16. +3 −2 core/model/modx/processors/element/chunk/duplicate.php
  17. +1 −2 core/model/modx/processors/element/chunk/remove.php
  18. +1 −2 core/model/modx/processors/element/chunk/update.php
  19. +2 −2 core/model/modx/processors/element/plugin/create.php
  20. +1 −2 core/model/modx/processors/element/plugin/remove.php
  21. +1 −2 core/model/modx/processors/element/plugin/update.php
  22. +1 −2 core/model/modx/processors/element/snippet/create.php
  23. +1 −2 core/model/modx/processors/element/snippet/remove.php
  24. +1 −2 core/model/modx/processors/element/snippet/update.php
  25. +1 −2 core/model/modx/processors/element/template/create.php
  26. +1 −2 core/model/modx/processors/element/template/remove.php
  27. +1 −2 core/model/modx/processors/element/template/update.php
  28. +1 −3 core/model/modx/processors/element/tv/create.php
  29. +1 −3 core/model/modx/processors/element/tv/remove.php
  30. +1 −2 core/model/modx/processors/element/tv/update.php
  31. +9 −12 core/model/modx/processors/resource/create.php
  32. +6 −1 core/model/modx/processors/resource/data.php
  33. +8 −4 core/model/modx/processors/resource/delete.php
  34. +0 −4 core/model/modx/processors/resource/emptyrecyclebin.php
  35. +8 −4 core/model/modx/processors/resource/publish.php
  36. +10 −3 core/model/modx/processors/resource/sort.php
  37. +8 −11 core/model/modx/processors/resource/staticresource/create.php
  38. +9 −13 core/model/modx/processors/resource/staticresource/update.php
  39. +6 −2 core/model/modx/processors/resource/undelete.php
  40. +7 −5 core/model/modx/processors/resource/unpublish.php
  41. +8 −12 core/model/modx/processors/resource/update.php
  42. +8 −11 core/model/modx/processors/resource/updatefromgrid.php
  43. +85 −25 core/model/modx/processors/system/clearcache.php
  44. +5 −1 core/model/modx/processors/system/menu/getmenu.php
  45. +6 −3 core/model/modx/processors/workspace/packages/getlist.php
  46. +1 −2 core/model/modx/processors/workspace/packages/install.php
  47. +1 −2 core/model/modx/processors/workspace/packages/remove.php
  48. +1 −2 core/model/modx/processors/workspace/packages/uninstall.php
  49. +1 −2 core/model/modx/processors/workspace/packages/version/remove.php
  50. +16 −2 core/xpdo/cache/xpdoapccache.class.php
  51. +100 −26 core/xpdo/cache/xpdocachemanager.class.php
  52. +2 −1 core/xpdo/cache/xpdomemcache.class.php
  53. +22 −0 core/xpdo/changelog.txt
  54. +27 −24 core/xpdo/om/sqlsrv/xpdoquery.class.php
  55. +2 −2 core/xpdo/om/xpdoobject.class.php
  56. +44 −19 core/xpdo/xpdo.class.php
  57. +1 −2 index.php
  58. +5 −1 manager/controllers/default/header.php
  59. +6 −1 manager/controllers/default/resource/data.php
  60. +2 −18 manager/controllers/default/system/refresh_site.php
  61. +1 −2 manager/index.php
  62. +11 −6 setup/includes/modinstall.class.php
@@ -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',
View
@@ -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
View
@@ -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.';
Oops, something went wrong.

0 comments on commit d964b98

Please sign in to comment.