You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Where CacheHints is an object. Adding extra properties to objects allows the interface to evolve.
Currently this object would have 1 property, key string (I suggest renaming it, as key is a bit generic, in .NET use SuggestedCacheKey).
In the future we can have: hasTokens boolean, suggesedExpiryDate datetime
Proposal 2
Same as proposal 1, but switch to a Read/Write/Delete interface + context object. Export / Replace seems more cryptic.
The text was updated successfully, but these errors were encountered:
The current cache interface is not extensible enough. Adding new features to the cache is difficult.
At a minimum, the interface should be changed to allow modification.
Note: this proposal is somewhat orthogonal to #379, but #379 does show the difficulty of evolving the interface.
Existing interface
Proposal 1
Where
CacheHints
is an object. Adding extra properties to objects allows the interface to evolve.Currently this object would have 1 property,
key string
(I suggest renaming it, askey
is a bit generic, in .NET useSuggestedCacheKey
).In the future we can have:
hasTokens boolean
,suggesedExpiryDate datetime
Proposal 2
Same as proposal 1, but switch to a
Read/Write/Delete
interface + context object.Export / Replace
seems more cryptic.The text was updated successfully, but these errors were encountered: