Delete Cache



  • When I try to delete Cache I get the following:
    Call to undefined method PageCache::flush()
    at line 1267 in file controllers/admin/AdminPerformanceController.php

    1262.                $redirectAdmin = true;
    1263.                Tools::clearSmartyCache();
    1264.                Tools::clearXMLCache();
    1265.                Media::clearCache();
    1266.                Tools::generateIndex();
    1267. =>             PageCache::flush();
    1268.                if (function_exists('opcache_reset')) {
    1269.                    opcache_reset();
    1270.                }
    1271.            }
    1272.    
    
    • AdminPerformanceControllerCore->postProcess - [line 379 - classes/controller/Controller.php]
    374.                if ($this->checkAccess()) {
    375.                    if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
    376.                        $this->setMedia();
    377.                    }
    378.    
    379. =>                 $this->postProcess();
    380.    
    381.                    if (!empty($this->redirect_after)) {
    382.                        $this->redirect();
    383.                    }
    384.    
    
    • ControllerCore->run - [line 742 - classes/Dispatcher.php]
    737.                if (isset($paramsHookActionDispatcher)) {
    738.                    Hook::exec('actionDispatcher', $paramsHookActionDispatcher);
    739.                }
    740.    
    741.                // Running controller
    742. =>             $controller->run();
    743.            } catch (PrestaShopException $e) {
    744.                $e->displayMessage();
    745.            }
    746.        }
    747.    
    
    • DispatcherCore->dispatch - [line 58 - admin/index.php]
    53.    if (!isset($_REQUEST['controller']) && isset($_REQUEST['tab'])) {
    54.        $_REQUEST['controller'] = strtolower($_REQUEST['tab']);
    55.    }
    56.    
    57.    // Prepare and trigger admin dispatcher
    58. => Dispatcher::getInstance()->dispatch();
    

    I am using redis and full page cache.

    Regards



  • PageCache::flush() exists: https://github.com/thirtybees/thirtybees/blob/1.0.x/classes/PageCache.php#L173

    Are there overrides involved? cache/class_index.php deleted (will be re-built automatically) ?



  • Yes the method is there… No I don’t use any overrides for this class… I just deleted cache/class_index.php. But Still the same error.



  • Is PageCache in this class index? The section should look like this:

      'PageCache' => 
      array (
        'path' => '',
        'type' => 'class',
        'override' => false,
      ),
      'PageCacheCore' => 
      array (
        'path' => 'classes/PageCache.php',
        'type' => 'class',
        'override' => false,
      ),
    


  • Are you 100% sure that there is no overrides?

    I previously used Page Cache from Jpresta (the class is called PageCache) it’s included in the dispatcher override and it’s still included when you chose to disable all overrides in the TB config AND it will also remain included when you uninstall the module. The module seems to have a hard time cleaning up.

    So check your overrides maybe there is something left behind. Just search your override folder for “/pagecache.php’”



  • Looks the same:

      'PageCache' => 
      array (
        'path' => '',
        'type' => 'class',
        'override' => false,
      ),
      'PageCacheCore' => 
      array (
        'path' => 'classes/PageCache.php',
        'type' => 'class',
        'override' => false,
      ),
    

    Also it says no overrides. Any idea?



  • Damn! Now I found it… In my modules folder there was a module “pagecache”. This module wasn’t even installed and no files were copied to the override folder. I deleted it and now it works fine.

    Is this a normal behaviour?

    It seems to me, that almost all problems I got with tb are name related.



  • If this module introduces a class “PageCache” or “PageCacheCore”, then yes, that’s not wanted, but expected.


 

Looks like your connection to thirty bees forum was lost, please wait while we try to reconnect.