A query cache size should anticipate the number of queries that are typically executed against that repository. For example, a query cache is probably not effective for the profile repository, as the most common type of query is the login query, which is executed once for each login/password combination. A query whose parameters are subject to frequent changes—for example, a query parameter that is set to system time—is also not a good candidate for caching.

It is generally safe to set the size of the query cache to 1000 or higher. Query caches only contain the query parameters and string IDs of the result set items, so large query cache sizes can usually be handled comfortably without running out of memory.