Github user maryannxue commented on a diff in the pull request: https://github.com/apache/phoenix/pull/298#discussion_r183127442 --- Diff: phoenix-core/src/main/java/org/apache/phoenix/cache/ServerCacheClient.java --- @@ -216,22 +234,146 @@ public void close() throws SQLException { } } } - + } + + public ServerCache checkServerCache(final byte[] cacheId, ScanRanges keyRanges, final TableRef cacheUsingTableRef, --- End diff -- I am thinking here, can we do this differently? Instead of making RPC calls of "checkServerCache" for the first and every subsequent queries, we do NOT make any calls, neither "check" or "add" when the persistent-cache hint is available and catches the {{PersistentCacheNotFoundException}} on the first attempt (or later attempts if somehow the cache has been evicted) and then try adding the cache all over again. I think it will be more efficient in general.
---