We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
getAllTags or getAllTagsWithModelsCount method when using cache should consider the criteria:
you see the code is like this
public function getAllTags($criteria = null) { if(!($tags = $this->cache->get('Taggable'.$this->getOwner()->tableName().'All'))){ ... $this->cache->set('Taggable'.$this->getOwner()->tableName().'All', $tags); } return $tags; }
when the criteria is different method will return the same thing . may be it should like this (not sure)
public function getAllTags($criteria = null) { $extraCacheKey = empty($criteria) ? '' : serialize($criteria); // var_export($criteria,true); may consider too ! if(!($tags = $this->cache->get('Taggable'.$this->getOwner()->tableName().'All'.$extraCacheKey ))){ ... $this->cache->set('Taggable'.$this->getOwner()->tableName().'All'.$extraCacheKey, $tags); } return $tags; }
same problem with getAllTagsWithModelsCount method
The text was updated successfully, but these errors were encountered:
You are right, cache must consider criteria.
Sorry, something went wrong.
so do you have any solution to that ? i just think about using CExpressionDependency , but not very sure whether there is a better solution ?
and not too clear about the cache expiration for using CExpressionDependency
No branches or pull requests
getAllTags or getAllTagsWithModelsCount method when using cache should consider the criteria:
you see the code is like this
when the criteria is different method will return the same thing . may be it should like this (not sure)
same problem with getAllTagsWithModelsCount method
The text was updated successfully, but these errors were encountered: