Should we also need to `synchronized (cache)` in `clearCache`?