Switch cache to use weak reference