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

Method for clearing cache of one resource #428

Merged
merged 1 commit into from Oct 21, 2013
Merged

Method for clearing cache of one resource #428

merged 1 commit into from Oct 21, 2013

Conversation

bezumkin
Copy link
Contributor

I think it is vary useful method, that is need for many developers.
I use it in my component and can do just

$res = $modx->getObject('modResource', 15);
$res->clearCache();

And it clears cache only for this resource.

I think it is vary useful method, that is need for many developers.
I use it in my component and can do just
<pre>$res = $modx->getObject('modResource', 15);
$res->clearCache();
</pre>
@jpdevries
Copy link
Contributor

This is interesting, and I could see it being useful for a sorts of applications

@alroniks
Copy link
Collaborator

alroniks commented Jul 4, 2013

@opengeek
Copy link
Member

If the Resource exists in multiple Contexts, this should clear the entries from each Context, not just the current one. Also, when getting the cache provider, you need to make sure it gets all the proper cache options. I will merge this and make these adjustments.

@bezumkin
Copy link
Contributor Author

Thanks!

@exside
Copy link
Contributor

exside commented Sep 17, 2013

Great news, thanks for that!

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.

None yet

5 participants