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

feature(CacheItemSelector): add a condition in 'forget' method to be … #454

Closed
wants to merge 2 commits into from

Conversation

jbidad
Copy link

@jbidad jbidad commented Oct 25, 2023

add a condition in 'forget' method to be able to forget by hashes(keys) also

Copy link
Member

@freekmurze freekmurze left a comment

Choose a reason for hiding this comment

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

Could you also add a test for this?

@@ -35,6 +36,14 @@ public function forget(): void
{
collect($this->urls)
->map(function ($uri) {
if (
is_string($uri) &&
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand what this does. Could you refactor this to a method with a name that explains what it does? Don't use && but early returns in that method.

Copy link
Author

Choose a reason for hiding this comment

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

thank you for your comment, I add 'isUriHashed' to explain that more clear
@freekmurze

@freekmurze
Copy link
Member

Could you add tests for the new functionality?

@spatie-bot
Copy link

Dear contributor,

because this pull request seems to be inactive for quite some time now, I've automatically closed it. If you feel this pull request deserves some attention from my human colleagues feel free to reopen it.

@spatie-bot spatie-bot closed this Mar 4, 2024
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