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

Allow cache disabling, make extra key string optional #587

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

leegarner
Copy link
Contributor

Two things discovered....

  1. The CommentCollection::getObjects() wasn't updated to submit a key to Collection::tryCache(). The idea is that either the base getRows() function or a child class getObjects() function will be called, so as long as getRows() sets the key it can be optional for getObjects().
  2. Since the cache key is based on the SQL query and parameters, some queries (RAND() comes to mind), caching the results that way doesn't work. Collection::withCache() can be called with "false" to disable caching if needed.

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.

1 participant