私はWindows上で、FileSystemAdapter
によって生成されたキャッシュの場所を探しています。私はそれがアプリケーションディレクトリのvar/cacheにあると思ったが、クリアしたときと同じようには見えない。それでもキャッシュを使用している。Symfony 3のFilesystemAdapterのデフォルトキャッシュディレクトリはどこですか?
どのようなことが考えられますか?
私はWindows上で、FileSystemAdapter
によって生成されたキャッシュの場所を探しています。私はそれがアプリケーションディレクトリのvar/cacheにあると思ったが、クリアしたときと同じようには見えない。それでもキャッシュを使用している。Symfony 3のFilesystemAdapterのデフォルトキャッシュディレクトリはどこですか?
どのようなことが考えられますか?
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
);
ノート:何も指定されていない場合は、ディレクトリsysの内部に作成されますテンポラリディレクトリにある
も参照してください:Removing Cache Items
私のCygwinシェルでは、ディレクトリは/ tmp/symfony-cache / –
クラスはthis traitを使用し、ディレクトリを指定しない場合は、テンポラリファイルに使用するディレクトリパスを返す関数sys_get_temp_dirを使用します。 Windowsベースのシステムの場合
は次のようになります。C:\Windows\Temp
・ホープ、このヘルプ
ディレクトリは、システムの一時ディレクトリ内に作成される場所を定義していない場合。 –