-
Notifications
You must be signed in to change notification settings - Fork 154
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
[FEATURE] Add a simple string cache #1097
Conversation
This class then will later be used to replace the current caching that is based on nested arrays. Part of #144.
1305a8c
to
383b72b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could the class implement ArrayAccess
(instead of the set
/get
/has
methods)? This would also mean fewer changes to the existing code which could continue to get, set and test the cached values using the []
operator and isset
.
As far as I understand it, this would mostly remove the benefit of this class over using a plain array:
So I'd prefer to now implement |
Yeah, I wondered about that, and can't think of or find a solution. Unlike C++, PHP does not have templates so it's not possible to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks generally good, and I can't think of any tests that are missing.
A few minor issues and questions.
@JakeQZ I immensely appreciate your detailed reviews! ❤️ On it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lovely. (Sorry for the delay getting back to you, been away quite a but and also busy on other projects.)
This class then will later be used to replace the current caching
that is based on nested arrays.
Part of #144.