diff --git a/ChangeLog b/ChangeLog index 5ad186d..a812e0a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 2015-04-13 Richard Frith-Macdonald + * SQLClient.h: * SQLClientPool.m: Make sure clients provided temporarily in convenience methods are swallowed by the pool again as soon as possible. Also trap and @@ -7,6 +8,7 @@ the client being in use longer than necessary after an exception. Also, avoid taking clients from the pool in a few cases wehere we don't actually need to. + Add -cache method for SQLClientPool. 2015-04-12 Richard Frith-Macdonald diff --git a/SQLClient.h b/SQLClient.h index d77a781..f87d24a 100644 --- a/SQLClient.h +++ b/SQLClient.h @@ -1507,6 +1507,12 @@ SQLCLIENT_PRIVATE */ - (int) availableConnections; +/** + * Returns the cache used by clients in the pool for storing the results of + * requests made through them. Creates a new cache if necessary. + */ +- (GSCache*) cache; + /** * Creates a pool of clients using a single client configuration.
* Calls -initWithConfiguration:name:pool: (passing NO to say the client diff --git a/SQLClientPool.m b/SQLClientPool.m index e5a7964..e40ee39 100644 --- a/SQLClientPool.m +++ b/SQLClientPool.m @@ -79,6 +79,11 @@ return available; } +- (GSCache*) cache +{ + return [q cache]; +} + - (void) dealloc { SQLClient **clients;