We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9945b66 commit 52f18fdCopy full SHA for 52f18fd
Plugin.php
@@ -124,8 +124,14 @@ public static function config(Typecho_Widget_Helper_Form $form)
124
*/
125
public static function configHandle($config, $is_init)
126
{
127
- if ($is_init != true) {
128
- self::init();
+ if ($is_init != true && $config['cache_driver'] != '0') {
+
129
+ $driver_name = $config['cache_driver'];
130
+ $class_name = "typecho_$driver_name";
131
+ $file_path = "driver/$class_name.class.php";
132
+ require_once 'driver/cache.interface.php';
133
+ require_once $file_path;
134
+ self::$cache = $class_name::getInstance(self::$plugin_config);
135
136
try {
137
if ($config['is_clean'] == '1') self::$cache->flush();
0 commit comments