Fixed memory leak in LocalCache.