diff --git a/config/application.config.php b/config/application.config.php
index f12766dcdefe23a819588de5a10a115ad4ec7ffc..a67cd3e2043f48820393466411e81af71ae852c1 100644
--- a/config/application.config.php
+++ b/config/application.config.php
@@ -1,14 +1,42 @@
 <?php
-$config = array(
-    'modules' => array(
-        'VuFindHttp', 'VuFindTheme', 'VuFindSearch', 'VuFind', 'VuFindAdmin'
-    ),
+
+// Set up modules:
+$modules = array(
+    'VuFindHttp', 'VuFindTheme', 'VuFindSearch', 'VuFind', 'VuFindAdmin'
+);
+if (PHP_SAPI == 'cli' && !defined('VUFIND_PHPUNIT_RUNNING')) {
+    $modules[] = 'VuFindConsole';
+}
+if (APPLICATION_ENV == 'development') {
+    $modules[] = 'VuFindDevTools';
+}
+if ($localModules = getenv('VUFIND_LOCAL_MODULES')) {
+    $localModules = array_map('trim', explode(',', $localModules));
+    foreach ($localModules as $current) {
+        if (!empty($current)) {
+            $modules[] = $current;
+        }
+    }
+}
+
+// Set up cache directory:
+$baseDir = ($local = getenv('VUFIND_LOCAL_DIR')) ? $local : 'data';
+$cacheDir = $baseDir . '/cache/configs';
+if (!is_dir($cacheDir)) {
+    mkdir($cacheDir);
+}
+
+// Build configuration:
+return array(
+    'modules' => array_unique($modules),
     'module_listener_options' => array(
         'config_glob_paths'    => array(
             'config/autoload/{,*.}{global,local}.php',
         ),
-        'config_cache_enabled' => false,
-        'cache_dir'            => 'data/cache',
+        'config_cache_enabled' => (APPLICATION_ENV != 'development'),
+        'module_map_cache_enabled' => (APPLICATION_ENV != 'development'),
+        'check_dependencies' => (APPLICATION_ENV == 'development'),
+        'cache_dir'            => $cacheDir,
         'module_paths' => array(
             './module',
             './vendor',
@@ -19,19 +47,4 @@ $config = array(
         'factories'    => array(
         ),
     ),
-);
-if (PHP_SAPI == 'cli' && !defined('VUFIND_PHPUNIT_RUNNING')) {
-    $config['modules'][] = 'VuFindConsole';
-}
-if (APPLICATION_ENV == 'development') {
-    $config['modules'][] = 'VuFindDevTools';
-}
-if ($localModules = getenv('VUFIND_LOCAL_MODULES')) {
-    $localModules = array_map('trim', explode(',', $localModules));
-    foreach ($localModules as $current) {
-        if (!empty($current) && !in_array($current, $config['modules'])) {
-            $config['modules'][] = $current;
-        }
-    }
-}
-return $config;
+);
\ No newline at end of file
diff --git a/module/VuFind/src/VuFind/Cache/Manager.php b/module/VuFind/src/VuFind/Cache/Manager.php
index b0cb6c8d018022f57bf0b16b0647cecb15404f84..6e2f344b9b492ea029768d0c28558cf5928dad2a 100644
--- a/module/VuFind/src/VuFind/Cache/Manager.php
+++ b/module/VuFind/src/VuFind/Cache/Manager.php
@@ -89,7 +89,7 @@ class Manager
         $cacheBase = $this->getCacheDir();
 
         // Set up standard file-based caches:
-        foreach (array('cover', 'language', 'object') as $cache) {
+        foreach (array('config', 'cover', 'language', 'object') as $cache) {
             $this->createFileCache($cache, $cacheBase . $cache . 's');
         }