method deleteAll documentation in bbn\Cache

Deletes all the cache from the given path or globally if none is given.

function(string $st = NULL) { if (self::$type === 'files') { if ($st === null) { $st = ''; } $dir = self::_dir($st, $this->path, false); if ($this->fs->isDir($dir)) { return (bool)$this->fs->delete($dir, $dir === $this->path ? false : true); } else { try { $res = $this->fs->delete($dir.'.bbn.cache'); } catch (Exception $e) { $res = false; } return (bool)$res; } } elseif (self::$type) { $items = $this->items($st); $res = 0; foreach ($items as $item){ if (!$st || strpos($item, $st) === 0) { switch (self::$type){ case 'apc': $res += (int)apc_delete($item); break; case 'memcache': $res += (int)$this->obj->delete($item); break; } } } return $res; } return false; }

Deletes all the cache from the given path or globally if none is given. BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way

This website uses cookies to ensure you get the best experience on our website.