mirror of
https://github.com/gnustep/libs-sqlclient.git
synced 2025-02-19 01:50:49 +00:00
Fix caching bug
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/sqlclient/trunk@21750 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a6356d78ce
commit
d62edc6002
1 changed files with 8 additions and 1 deletions
|
@ -1957,12 +1957,19 @@ static void quoteString(NSMutableString *s)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (seconds == 0)
|
||||
{
|
||||
// We have been told to remove the existing cached item.
|
||||
[c setObject: nil forKey: stmt lifetime: seconds];
|
||||
toCache = nil;
|
||||
}
|
||||
[c setObject: toCache forKey: stmt lifetime: seconds];
|
||||
|
||||
if (toCache != nil)
|
||||
{
|
||||
// We have a newly retrieved object ... cache it.
|
||||
[c setObject: toCache forKey: stmt lifetime: seconds];
|
||||
}
|
||||
|
||||
if (result != nil)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue