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:
Richard Frith-Macdonald 2005-09-27 14:07:04 +00:00
parent a6356d78ce
commit d62edc6002

View file

@ -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)
{