You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by johnthuss <gi...@git.apache.org> on 2018/05/02 15:35:27 UTC

[GitHub] cayenne pull request #292: QueryCache improvements for local caching

GitHub user johnthuss opened a pull request:

    https://github.com/apache/cayenne/pull/292

    QueryCache improvements for local caching

    Added getQueryCache to the ObjectContext interface since this is already implemented by BaseContext anyway and makes accessing the cache much easier.
    
    Revised signature for QueryCache.remove(String) to be remove(QueryMetadata) to increase understandability. It was never clear how to use this method before.
    
    Added QueryCache.clearLocalCache method. This is now called automatically at the end of the request-response loop in StatelessContextRequestHandler and by BaseContext.finalize. This will prevent memory leaking from locally cached data in cases where the cache is not configured to expire entries based on time.
    
    Added QueryCache.debugListCacheKeys method to list all keys (prefixed by cache group) in the cache for debugging purposes.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/johnthuss/cayenne querycache

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cayenne/pull/292.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #292
    
----
commit be51331499f8dbdb9c897db90602f491a711715f
Author: John Huss <jo...@...>
Date:   2018-05-01T22:02:56Z

    Added getQueryCache to the ObjectContext interface since this is already implemented by BaseContext anyway and makes accessing the cache much easier.
    
    Revised signature for QueryCache.remove(String) to be remove(QueryMetadata) to increase understandability. It was never clear how to use this method before.
    
    Added QueryCache.clearLocalCache method. This is now called automatically at the end of the request-response loop in StatelessContextRequestHandler and by BaseContext.finalize. This will prevent memory leaking from locally cached data in cases where the cache is not configured to expire entries based on time.
    
    Added QueryCache.debugListCacheKeys method to list all keys (prefixed by cache group) in the cache for debugging purposes.

----


---