I have some questions about caching. Some preconditions first:
// query 1
$data1 = $this->myRepository->findByPid($myPid);
// query 2
$data2 = $this->myRepository->findOneByUid($myUid);
My questions:
- If I execute query 2 several times in a script, the first call retrieves the data from the database, all other from the cache, without querying the database?
- If I execute query 2 again later (e.g. in a second script) the data is retrieved again from the database (there is no persistent query cache, except I use the caching framework to store the results of this query)?
- If I execute query 1 and then query 2 and query 1 contains the data for uid "$myUid", then the data for query 2 is retrieved from the cache?