Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix: cache issues when several QA installation resides on the same se…

…rver with MemCache or APC
  • Loading branch information...
commit b89e20ad8bdce2a350a180f3bba815a6b8771067 1 parent d7e5a8f
@quickapps authored
Showing with 33 additions and 1 deletion.
  1. +31 −0 QuickApps/Config/bootstrap.php
  2. +2 −1  QuickApps/Config/core.php
View
31 QuickApps/Config/bootstrap.php
@@ -163,9 +163,40 @@ function __t($singular, $args = null) {
return QuickApps::__t($singular, $args);
}
+/**
+ * You can attach event listeners to the request lifecyle as Dispatcher Filter . By Default CakePHP bundles two filters:
+ *
+ * - AssetDispatcher filter will serve your asset files (css, images, js, etc) from your themes and plugins
+ * - CacheDispatcher filter will read the Cache.check configure variable and try to serve cached content generated from controllers
+ *
+ * Feel free to remove or add filters as you see fit for your application. A few examples:
+ *
+ * Configure::write('Dispatcher.filters', array(
+ * 'MyCacheFilter', // will use MyCacheFilter class from the Routing/Filter package in your app.
+ * 'MyPlugin.MyFilter', // will use MyFilter class from the Routing/Filter package in MyPlugin plugin.
+ * array('callable' => $aFunction, 'on' => 'before', 'priority' => 9), // A valid PHP callback type to be called on beforeDispatch
+ * array('callable' => $anotherMethod, 'on' => 'after'), // A valid PHP callback type to be called on afterDispatch
+ *
+ * ));
+ */
Configure::write('Dispatcher.filters', array(
'AssetDispatcher',
'CacheDispatcher'
));
+/**
+ * Configures default file logging options
+ */
+App::uses('CakeLog', 'Log');
+CakeLog::config('debug', array(
+ 'engine' => 'FileLog',
+ 'types' => array('notice', 'info', 'debug'),
+ 'file' => 'debug',
+));
+CakeLog::config('error', array(
+ 'engine' => 'FileLog',
+ 'types' => array('warning', 'error', 'critical', 'alert', 'emergency'),
+ 'file' => 'error',
+));
+
include_once ROOT . DS . 'Config' . DS . 'bootstrap.php';
View
3  QuickApps/Config/core.php
@@ -253,7 +253,8 @@
}
// Prefix each application on the same server with a different string, to avoid Memcache and APC conflicts.
-$prefix = 'qa_';
+App::uses('Inflector', 'Utility');
+$prefix = Inflector::slug(ROOT) . '_';
/**
* Configure the cache used for general framework caching. Path information,
Please sign in to comment.
Something went wrong with that request. Please try again.