I recently started working with your webshop and I noticed that none of the methods on the Product Model are cached. At the moment I'm working directly with the model in my theme and I encountered the problem that every time I access a property, that requires a db query, it queries the database again. Sure I could just do this myself in the controller, but this would be an awesome feature to have out of the box.
Example for clarification:
public function getSomething(){
if(isset($this->cache['something'])){
return $this->cache['something'];
}
// function code
$this->cache['something'] = $result;
return $result;
}
To be 100% backwards compatible you could tie the cache to a flag of some sort. If you would like a pull request, I can provide :).
Hi @Dragony -- While I agree that we should be cacheing results of SQL queries, this doesn't seem like something we will be adding to Web Store any time soon. I'm going to close this issue.
Hello!
I recently started working with your webshop and I noticed that none of the methods on the Product Model are cached. At the moment I'm working directly with the model in my theme and I encountered the problem that every time I access a property, that requires a db query, it queries the database again. Sure I could just do this myself in the controller, but this would be an awesome feature to have out of the box.
Example for clarification:
To be 100% backwards compatible you could tie the cache to a flag of some sort. If you would like a pull request, I can provide :).
Best Regards Mattias