From fbda15ff5b426f1f7b2d5677349c1edf7f322573 Mon Sep 17 00:00:00 2001 From: HB9HIL Date: Mon, 2 Feb 2026 16:28:44 +0100 Subject: [PATCH] cache clean works fine with file adapter. no need to hassle around with file handling --- application/models/Debug_model.php | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/application/models/Debug_model.php b/application/models/Debug_model.php index c06201909..4f72e54cc 100644 --- a/application/models/Debug_model.php +++ b/application/models/Debug_model.php @@ -266,28 +266,6 @@ class Debug_model extends CI_Model 'key_prefix' => $cache_key_prefix ]); - if ($cache_adapter === 'file') { - $cache_path = $this->config->item('cache_path') ?: 'application/cache'; - $cache_path = realpath(APPPATH . '../') . '/' . $cache_path; - - if (!is_dir($cache_path)) { - return false; - } - - $files = new RecursiveIteratorIterator( - new RecursiveDirectoryIterator($cache_path, RecursiveDirectoryIterator::SKIP_DOTS), - RecursiveIteratorIterator::CHILD_FIRST - ); - - foreach ($files as $file) { - if ($file->isFile() && !in_array($file->getFilename(), ['index.html', '.htaccess'])) { - @unlink($file->getRealPath()); - } - } - - return true; - } - if (method_exists($this->cache, 'clean')) { return $this->cache->clean(); }