public LRUCacheEntry delete(final String namespace, final Bytes key) {
        final NamedCache cache = getCache(namespace);
        if (cache == null) {
            return null;
        }

        final LRUCacheEntry entry;
        synchronized (cache) {
            final long oldSize = cache.sizeInBytes();
            entry = cache.delete(key);
            sizeInBytes.getAndAdd(cache.sizeInBytes() - oldSize);
        }
        return entry;
    }
@Test
    public void shouldNotBlowUpOnNonExistentNamespaceWhenDeleting() {
        final ThreadCache cache = new ThreadCache(logContext, 10000L, new MockStreamsMetrics(new Metrics()));
        assertNull(cache.delete(namespace, Bytes.wrap(new byte[]{1})));
    }