![]() |
Display a custom error if the cache driver fails - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Display a custom error if the cache driver fails (/showthread.php?tid=90722) |
Display a custom error if the cache driver fails - b126 - 04-23-2024 What would be the best way to display a custom error message when the cache driver fails (Memcached in my case)? I thought of creating a FILTER, and within this filter testing the ->getCacheInfo() method. Does this seem correct? Like this: Config\Filters.php PHP Code: public array $aliases = [ Filters\VerifyMemCachedFilter.php PHP Code: public function before(RequestInterface $request, $arguments = null) |