Open
Description
Background
SqsQueryProcessor
has an object called queryExecutorCache
which caches query executors for tables.
Description
This cache may have uses outside of the SQS and lambda based approach to executing queries, e.g. if you want to build a long running EC2 instance that receives queries over a REST interface and executes them on behalf of a user, you would want to have a cache of query executors.
As part of this we can set the maximum size of the cache to help avoid running out of memory.
Analysis
We can extract the code that caches the query executors so that it can be reused in other places (either in the Sleeper code case or in custom code written by deployers of Sleeper).
Activity