{"payload":{"allShortcutsEnabled":false,"fileTree":{"src/Symfony/Contracts/Cache":{"items":[{"name":".gitignore","path":"src/Symfony/Contracts/Cache/.gitignore","contentType":"file"},{"name":"CHANGELOG.md","path":"src/Symfony/Contracts/Cache/CHANGELOG.md","contentType":"file"},{"name":"CacheInterface.php","path":"src/Symfony/Contracts/Cache/CacheInterface.php","contentType":"file"},{"name":"CacheTrait.php","path":"src/Symfony/Contracts/Cache/CacheTrait.php","contentType":"file"},{"name":"CallbackInterface.php","path":"src/Symfony/Contracts/Cache/CallbackInterface.php","contentType":"file"},{"name":"ItemInterface.php","path":"src/Symfony/Contracts/Cache/ItemInterface.php","contentType":"file"},{"name":"LICENSE","path":"src/Symfony/Contracts/Cache/LICENSE","contentType":"file"},{"name":"README.md","path":"src/Symfony/Contracts/Cache/README.md","contentType":"file"},{"name":"TagAwareCacheInterface.php","path":"src/Symfony/Contracts/Cache/TagAwareCacheInterface.php","contentType":"file"},{"name":"composer.json","path":"src/Symfony/Contracts/Cache/composer.json","contentType":"file"}],"totalCount":10},"src/Symfony/Contracts":{"items":[{"name":"Cache","path":"src/Symfony/Contracts/Cache","contentType":"directory"},{"name":"Deprecation","path":"src/Symfony/Contracts/Deprecation","contentType":"directory"},{"name":"EventDispatcher","path":"src/Symfony/Contracts/EventDispatcher","contentType":"directory"},{"name":"HttpClient","path":"src/Symfony/Contracts/HttpClient","contentType":"directory"},{"name":"Service","path":"src/Symfony/Contracts/Service","contentType":"directory"},{"name":"Tests","path":"src/Symfony/Contracts/Tests","contentType":"directory"},{"name":"Translation","path":"src/Symfony/Contracts/Translation","contentType":"directory"},{"name":".gitignore","path":"src/Symfony/Contracts/.gitignore","contentType":"file"},{"name":"CHANGELOG.md","path":"src/Symfony/Contracts/CHANGELOG.md","contentType":"file"},{"name":"LICENSE","path":"src/Symfony/Contracts/LICENSE","contentType":"file"},{"name":"README.md","path":"src/Symfony/Contracts/README.md","contentType":"file"},{"name":"composer.json","path":"src/Symfony/Contracts/composer.json","contentType":"file"},{"name":"phpunit.xml.dist","path":"src/Symfony/Contracts/phpunit.xml.dist","contentType":"file"}],"totalCount":13},"src/Symfony":{"items":[{"name":"Bridge","path":"src/Symfony/Bridge","contentType":"directory"},{"name":"Bundle","path":"src/Symfony/Bundle","contentType":"directory"},{"name":"Component","path":"src/Symfony/Component","contentType":"directory"},{"name":"Contracts","path":"src/Symfony/Contracts","contentType":"directory"}],"totalCount":4},"src":{"items":[{"name":"Symfony","path":"src/Symfony","contentType":"directory"}],"totalCount":1},"":{"items":[{"name":".github","path":".github","contentType":"directory"},{"name":"src","path":"src","contentType":"directory"},{"name":".appveyor.yml","path":".appveyor.yml","contentType":"file"},{"name":".editorconfig","path":".editorconfig","contentType":"file"},{"name":".gitattributes","path":".gitattributes","contentType":"file"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":".php-cs-fixer.dist.php","path":".php-cs-fixer.dist.php","contentType":"file"},{"name":".travis.yml","path":".travis.yml","contentType":"file"},{"name":"CHANGELOG-5.0.md","path":"CHANGELOG-5.0.md","contentType":"file"},{"name":"CHANGELOG-5.1.md","path":"CHANGELOG-5.1.md","contentType":"file"},{"name":"CHANGELOG-5.2.md","path":"CHANGELOG-5.2.md","contentType":"file"},{"name":"CODE_OF_CONDUCT.md","path":"CODE_OF_CONDUCT.md","contentType":"file"},{"name":"CONTRIBUTING.md","path":"CONTRIBUTING.md","contentType":"file"},{"name":"CONTRIBUTORS.md","path":"CONTRIBUTORS.md","contentType":"file"},{"name":"LICENSE","path":"LICENSE","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"UPGRADE-5.0.md","path":"UPGRADE-5.0.md","contentType":"file"},{"name":"UPGRADE-5.1.md","path":"UPGRADE-5.1.md","contentType":"file"},{"name":"UPGRADE-5.2.md","path":"UPGRADE-5.2.md","contentType":"file"},{"name":"UPGRADE-6.0.md","path":"UPGRADE-6.0.md","contentType":"file"},{"name":"composer.json","path":"composer.json","contentType":"file"},{"name":"link","path":"link","contentType":"file"},{"name":"phpunit","path":"phpunit","contentType":"file"},{"name":"phpunit.xml.dist","path":"phpunit.xml.dist","contentType":"file"},{"name":"psalm.xml","path":"psalm.xml","contentType":"file"}],"totalCount":25}},"fileTreeProcessingTime":19.94187,"foldersToFetch":[],"repo":{"id":458058,"defaultBranch":"7.1","name":"symfony","ownerLogin":"symfony","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2010-01-04T14:21:21.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/143937?v=4","public":true,"private":false,"isOrgOwned":true},"symbolsExpanded":false,"treeExpanded":true,"refInfo":{"name":"5.2","listCacheKey":"v0:1709586367.0","canEdit":false,"refType":"branch","currentOid":"7fa617d4175e08a3d8e1cb5d67aa4523ad034dd8"},"path":"src/Symfony/Contracts/Cache/CacheInterface.php","currentUser":null,"blob":{"rawLines":[""," *"," * For the full copyright and license information, please view the LICENSE"," * file that was distributed with this source code."," */","","namespace Symfony\\Contracts\\Cache;","","use Psr\\Cache\\CacheItemInterface;","use Psr\\Cache\\InvalidArgumentException;","","/**"," * Covers most simple to advanced caching needs."," *"," * @author Nicolas Grekas
"," */","interface CacheInterface","{"," /**"," * Fetches a value from the pool or computes it if not found."," *"," * On cache misses, a callback is called that should return the missing value."," * This callback is given a PSR-6 CacheItemInterface instance corresponding to the"," * requested key, that could be used e.g. for expiration control. It could also"," * be an ItemInterface instance when its additional features are needed."," *"," * @param string $key The key of the item to retrieve from the cache"," * @param callable|CallbackInterface $callback Should return the computed value for the given key/item"," * @param float|null $beta A float that, as it grows, controls the likeliness of triggering"," * early expiration. 0 disables it, INF forces immediate expiration."," * The default (or providing null) is implementation dependent but should"," * typically be 1.0, which should provide optimal stampede protection."," * See https://en.wikipedia.org/wiki/Cache_stampede#Probabilistic_early_expiration"," * @param array &$metadata The metadata of the cached item {@see ItemInterface::getMetadata()}"," *"," * @return mixed The value corresponding to the provided key"," *"," * @throws InvalidArgumentException When $key is not valid or when $beta is negative"," */"," public function get(string $key, callable $callback, float $beta = null, array &$metadata = null);",""," /**"," * Removes an item from the pool."," *"," * @param string $key The key to delete"," *"," * @throws InvalidArgumentException When $key is not valid"," *"," * @return bool True if the item was successfully removed, false if there was any error"," */"," public function delete(string $key): bool;","}"],"stylingDirectives":[[{"start":0,"end":5,"cssClass":"pl-ent"}],[],[{"start":0,"end":2,"cssClass":"pl-c"}],[{"start":0,"end":44,"cssClass":"pl-c"}],[{"start":0,"end":2,"cssClass":"pl-c"}],[{"start":0,"end":44,"cssClass":"pl-c"}],[{"start":0,"end":2,"cssClass":"pl-c"}],[{"start":0,"end":74,"cssClass":"pl-c"}],[{"start":0,"end":51,"cssClass":"pl-c"}],[{"start":0,"end":3,"cssClass":"pl-c"}],[],[{"start":0,"end":9,"cssClass":"pl-k"},{"start":10,"end":17,"cssClass":"pl-v"},{"start":18,"end":27,"cssClass":"pl-v"},{"start":28,"end":33,"cssClass":"pl-v"}],[],[{"start":0,"end":3,"cssClass":"pl-k"},{"start":4,"end":7,"cssClass":"pl-v"},{"start":8,"end":13,"cssClass":"pl-v"},{"start":14,"end":32,"cssClass":"pl-v"}],[{"start":0,"end":3,"cssClass":"pl-k"},{"start":4,"end":7,"cssClass":"pl-v"},{"start":8,"end":13,"cssClass":"pl-v"},{"start":14,"end":38,"cssClass":"pl-v"}],[],[{"start":0,"end":3,"cssClass":"pl-c"}],[{"start":0,"end":48,"cssClass":"pl-c"}],[{"start":0,"end":2,"cssClass":"pl-c"}],[{"start":0,"end":41,"cssClass":"pl-c"}],[{"start":0,"end":3,"cssClass":"pl-c"}],[{"start":0,"end":9,"cssClass":"pl-k"},{"start":10,"end":24,"cssClass":"pl-v"}],[],[{"start":4,"end":7,"cssClass":"pl-c"}],[{"start":0,"end":65,"cssClass":"pl-c"}],[{"start":0,"end":6,"cssClass":"pl-c"}],[{"start":0,"end":82,"cssClass":"pl-c"}],[{"start":0,"end":86,"cssClass":"pl-c"}],[{"start":0,"end":83,"cssClass":"pl-c"}],[{"start":0,"end":76,"cssClass":"pl-c"}],[{"start":0,"end":6,"cssClass":"pl-c"}],[{"start":0,"end":98,"cssClass":"pl-c"}],[{"start":0,"end":107,"cssClass":"pl-c"}],[{"start":0,"end":116,"cssClass":"pl-c"}],[{"start":0,"end":117,"cssClass":"pl-c"}],[{"start":0,"end":122,"cssClass":"pl-c"}],[{"start":0,"end":119,"cssClass":"pl-c"}],[{"start":0,"end":131,"cssClass":"pl-c"}],[{"start":0,"end":119,"cssClass":"pl-c"}],[{"start":0,"end":6,"cssClass":"pl-c"}],[{"start":0,"end":64,"cssClass":"pl-c"}],[{"start":0,"end":6,"cssClass":"pl-c"}],[{"start":0,"end":88,"cssClass":"pl-c"}],[{"start":0,"end":7,"cssClass":"pl-c"}],[{"start":4,"end":10,"cssClass":"pl-k"},{"start":11,"end":19,"cssClass":"pl-k"},{"start":20,"end":23,"cssClass":"pl-en"},{"start":24,"end":30,"cssClass":"pl-smi"},{"start":31,"end":35,"cssClass":"pl-s1"},{"start":31,"end":32,"cssClass":"pl-c1"},{"start":37,"end":45,"cssClass":"pl-smi"},{"start":46,"end":55,"cssClass":"pl-s1"},{"start":46,"end":47,"cssClass":"pl-c1"},{"start":57,"end":62,"cssClass":"pl-smi"},{"start":63,"end":68,"cssClass":"pl-s1"},{"start":63,"end":64,"cssClass":"pl-c1"},{"start":71,"end":75,"cssClass":"pl-c1"},{"start":77,"end":82,"cssClass":"pl-smi"},{"start":84,"end":93,"cssClass":"pl-s1"},{"start":84,"end":85,"cssClass":"pl-c1"},{"start":96,"end":100,"cssClass":"pl-c1"}],[],[{"start":4,"end":7,"cssClass":"pl-c"}],[{"start":0,"end":37,"cssClass":"pl-c"}],[{"start":0,"end":6,"cssClass":"pl-c"}],[{"start":0,"end":43,"cssClass":"pl-c"}],[{"start":0,"end":6,"cssClass":"pl-c"}],[{"start":0,"end":62,"cssClass":"pl-c"}],[{"start":0,"end":6,"cssClass":"pl-c"}],[{"start":0,"end":91,"cssClass":"pl-c"}],[{"start":0,"end":7,"cssClass":"pl-c"}],[{"start":4,"end":10,"cssClass":"pl-k"},{"start":11,"end":19,"cssClass":"pl-k"},{"start":20,"end":26,"cssClass":"pl-en"},{"start":27,"end":33,"cssClass":"pl-smi"},{"start":34,"end":38,"cssClass":"pl-s1"},{"start":34,"end":35,"cssClass":"pl-c1"},{"start":41,"end":45,"cssClass":"pl-smi"}],[]],"colorizedLines":null,"csv":null,"csvError":null,"dependabotInfo":{"showConfigurationBanner":false,"configFilePath":null,"networkDependabotPath":"/symfony/symfony/network/updates","dismissConfigurationNoticePath":"/settings/dismiss-notice/dependabot_configuration_notice","configurationNoticeDismissed":null},"displayName":"CacheInterface.php","displayUrl":"https://github.com/symfony/symfony/blob/5.2/src/Symfony/Contracts/Cache/CacheInterface.php?raw=true","headerInfo":{"blobSize":"2.38 KB","deleteTooltip":"You must be signed in to make or propose changes","editTooltip":"You must be signed in to make or propose changes","ghDesktopPath":"https://desktop.github.com","isGitLfs":false,"onBranch":true,"shortPath":"4b1686b","siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Fsymfony%2Fsymfony%2Fblob%2F5.2%2Fsrc%2FSymfony%2FContracts%2FCache%2FCacheInterface.php","isCSV":false,"isRichtext":false,"toc":null,"lineInfo":{"truncatedLoc":"57","truncatedSloc":"52"},"mode":"file"},"image":false,"isCodeownersFile":null,"isPlain":false,"isValidLegacyIssueTemplate":false,"issueTemplate":null,"discussionTemplate":null,"language":"PHP","languageID":272,"large":false,"planSupportInfo":{"repoIsFork":null,"repoOwnedByCurrentUser":null,"requestFullPath":"/symfony/symfony/blob/5.2/src/Symfony/Contracts/Cache/CacheInterface.php","showFreeOrgGatedFeatureMessage":null,"showPlanSupportBanner":null,"upgradeDataAttributes":null,"upgradePath":null},"publishBannersInfo":{"dismissActionNoticePath":"/settings/dismiss-notice/publish_action_from_dockerfile","releasePath":"/symfony/symfony/releases/new?marketplace=true","showPublishActionBanner":false},"rawBlobUrl":"https://github.com/symfony/symfony/raw/5.2/src/Symfony/Contracts/Cache/CacheInterface.php","renderImageOrRaw":false,"richText":null,"renderedFileInfo":null,"shortPath":null,"symbolsEnabled":true,"tabSize":4,"topBannersInfo":{"overridingGlobalFundingFile":false,"globalPreferredFundingPath":"/symfony/.github/blob/6f2ca452c856184a28812bb364b4e34ed50309da/FUNDING.yml","showInvalidCitationWarning":false,"citationHelpUrl":"https://docs.github.com/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-citation-files","actionsOnboardingTip":null},"truncated":false,"viewable":true,"workflowRedirectUrl":null,"symbols":{"timed_out":false,"not_analyzed":false,"symbols":[{"name":"Symfony\\Contracts\\Cache","kind":"module","ident_start":248,"ident_end":271,"extent_start":238,"extent_end":272,"fully_qualified_name":"Symfony\\Contracts\\Cache","ident_utf16":{"start":{"line_number":11,"utf16_col":10},"end":{"line_number":11,"utf16_col":33}},"extent_utf16":{"start":{"line_number":11,"utf16_col":0},"end":{"line_number":11,"utf16_col":34}}},{"name":"CacheInterface","kind":"interface","ident_start":461,"ident_end":475,"extent_start":451,"extent_end":2436,"fully_qualified_name":"CacheInterface","ident_utf16":{"start":{"line_number":21,"utf16_col":10},"end":{"line_number":21,"utf16_col":24}},"extent_utf16":{"start":{"line_number":21,"utf16_col":0},"end":{"line_number":56,"utf16_col":1}}},{"name":"get","kind":"method","ident_start":2030,"ident_end":2033,"extent_start":2014,"extent_end":2112,"fully_qualified_name":"CacheInterface.get","ident_utf16":{"start":{"line_number":44,"utf16_col":20},"end":{"line_number":44,"utf16_col":23}},"extent_utf16":{"start":{"line_number":44,"utf16_col":4},"end":{"line_number":44,"utf16_col":102}}},{"name":"delete","kind":"method","ident_start":2408,"ident_end":2414,"extent_start":2392,"extent_end":2434,"fully_qualified_name":"CacheInterface.delete","ident_utf16":{"start":{"line_number":55,"utf16_col":20},"end":{"line_number":55,"utf16_col":26}},"extent_utf16":{"start":{"line_number":55,"utf16_col":4},"end":{"line_number":55,"utf16_col":46}}}]}},"copilotInfo":null,"copilotAccessAllowed":false,"csrf_tokens":{"/symfony/symfony/branches":{"post":"H9NLdovFRfE6lcYQ2y4zNbONLK6XgIkNwiNzFFO2AmVPGOWaco4GU_rtDck-R7BikciqKifwwFiXZrjOWwMnaA"},"/repos/preferences":{"post":"ZB7IA4KUYXppsn7IhhDarBJw8Et_zDJsSKZbd8QXPwa_O1iBmr8sPsebWLObqmsKA2MyJlFoApW3p7ytJgm4UQ"}}},"title":"symfony/src/Symfony/Contracts/Cache/CacheInterface.php at 5.2 ยท symfony/symfony"}