Created
August 31, 2016 23:04
-
-
Save chrisdlangton/ccd46008fee636f341deb35ef1e86c80 to your computer and use it in GitHub Desktop.
A language agnostic interface for a caching strategy
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
protocol CacheKeyStore | |
prop storeName = 'my cache key store name' | |
prop delimiter = '|' | |
func <void> | |
set => <str> cacheKey, | |
<str> json | |
func <str|cacheKey> | |
makeKey => <str> __CLASS__, | |
<str> __METHOD__, | |
<str> handledInput | |
func <str> | |
exists => <bool> | |
func <str> | |
fetch => <str> cacheKey | |
func <void> | |
delete => <str> cacheKey | |
func <void> | |
deleteAssoc => <str> cacheKeyPart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment