我在Windows上寻找FileSystemAdapter生成的缓存的位置.我认为它将在应用程序目录的var / cache中,但它看起来不像我清除它时,它仍然使用缓存.
知道它可能在哪里吗?
解决方法:
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
$cache = new FilesystemAdapter(
// the subdirectory of the main cache directory where cache items are stored
$namespace = '',
// in seconds; applied to cache items that don't define their own lifetime
// 0 means to store the cache items indefinitely (i.e. until the files are deleted)
$defaultLifetime = 0,
// the main cache directory (the application needs read-write permissions on it)
// if none is specified, a directory is created inside the system temporary directory
$directory = null
);
note: if none is specified, a directory is created inside the system
temporary directory.
标签:php,caching,symfony
来源: https://codeday.me/bug/20190527/1165205.html