This also adds a few related private helper methods which help reduce
code duplication.
Rationale: knowing whether a particular query is already cached can
change your mind about which queries to perform. For example, if I
want to get the first blog entry I could query for all blog entries
with a page size of 1. But if I already have a cached result set for
'all blog entries' with a larger page size it is much faster to use
that result set and take the first result from it.
This relies on my other pull request, since we need a reliable
CacheInterface API for this to be reliable.
This also adds a few related private helper methods which help reduce code duplication.
Rationale: knowing whether a particular query is already cached can change your mind about which queries to perform. For example, if I want to get the first blog entry I could query for all blog entries with a page size of 1. But if I already have a cached result set for 'all blog entries' with a larger page size it is much faster to use that result set and take the first result from it.
This relies on my other pull request, since we need a reliable CacheInterface API for this to be reliable.