-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow overriding cache expiry and cache key for cacheable commands
- Loading branch information
1 parent
ee9284c
commit 94e6de1
Showing
3 changed files
with
105 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace Chief; | ||
|
||
interface HasCacheOptions extends CacheableCommand | ||
{ | ||
/** | ||
* @return int|null | ||
* In how many seconds from now should this cache item expire. Return null to use the default value specified | ||
* in the CachingDecorator. | ||
*/ | ||
public function getCacheExpiry(); | ||
|
||
/** | ||
* @return string|null | ||
* The cache key used when caching this object. Return null to automatically generate a cache key. | ||
*/ | ||
public function getCacheKey(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters