Doctrine 2 Cache: Can I use cache with Repository::find*()?
问题 I am new to caching. From the docs, I can use caching with queries, but what about methods like $em->find('Application\Models\project', 1); 回答1: If you search for an automatism, i think the awnser is no, their is no such thing. I was searching for something like this my self. You can wrap find(...) in a method of a service class, getProjectById($id) and do caching inside this method your self. But then you need a save() method too, to clear-cache for specific id after flushing. 回答2: As