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

Too many clears if lock()is used #317

Open
IAkumaI opened this issue Aug 30, 2016 · 0 comments
Open

Too many clears if lock()is used #317

IAkumaI opened this issue Aug 30, 2016 · 0 comments

Comments

@IAkumaI
Copy link

IAkumaI commented Aug 30, 2016

I have a class with method which gets data from MySQL.
In this method I use:

if ($cacheItem->isMiss()) {
$cacheItem->lock();
...
$cacheItem->save();
}

All looks well, but in fact when I call lock() also called clear() and storeData() methods.

I my app I have 1000+ objects. Every object use different cache keys.
So, when I try to get 1000+ objects at one time, I have a many-many (100000+) call of clear() method.
It very slows down app.

Im sorry if this text is too difficult to understand. If you need I can write this in Russian :)

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

No branches or pull requests

1 participant