Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9804422

Browse files
committed
feature#19543 [Config] Allow custom meta location in ConfigCache (alamirault)
This PR was merged into the 7.1 branch.Discussion----------[Config] Allow custom meta location in ConfigCacheFix#19540 and#19496Commits-------91d8296 [Config] Allow custom meta location in ConfigCache
2 parents2ae2c17 +91d8296 commit9804422

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

‎components/config/caching.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,17 @@ the cache file itself. This ``.meta`` file contains the serialized resources,
5555
whose timestamps are used to determine if the cache is still fresh. When
5656
not in debug mode, the cache is considered to be "fresh" as soon as it exists,
5757
and therefore no ``.meta`` file will be generated.
58+
59+
You can explicitly define the absolute path to the meta file::
60+
61+
use Symfony\Component\Config\ConfigCache;
62+
use Symfony\Component\Config\Resource\FileResource;
63+
64+
$cachePath = __DIR__.'/cache/appUserMatcher.php';
65+
66+
// the third optional argument indicates the absolute path to the meta file
67+
$userMatcherCache = new ConfigCache($cachePath, true, '/my/absolute/path/to/cache.meta');
68+
69+
..versionadded::7.1
70+
71+
The argument to customize the meta file path was introduced in Symfony 7.1.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp