Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allows selective caching of certain calls, with very exact cust-key expiration #22

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

rajivraman
Copy link
Contributor

No description provided.

@rajivraman rajivraman assigned dchancogne and KidA78 and unassigned dchancogne Sep 10, 2014
namespace Traackr;

// Declare the interface
interface ApiCacheInterface
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Questioning the fact we are exposing a param named $custKey in this interface.

From a generic cache perspective, it doesn't seem very obvious what's it's for. You are almost imposing the cache implementation to use it by saying you have to use it to make the key unique. But is that really the cache responsibility to know that? Shouldn't that be done internally by the cache client (i.e. TraackrApiObject.php)

If the semantic is, the $custKey is provided and the implementation can do whatever it wants with it, they shouldn't it be passed to all methods, including isCacheable()? If the read() and write() logic relies on that parameter, one can assume that maybe isCacheable() also does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants