private boolean shouldCache() { return parsedCssCache != null && parsedCssCache.getCapacity() != 0; } }
private boolean shouldCache() { return parsedCssCache != null && parsedCssCache.getCapacity() != 0; } }
private boolean shouldCache() { return parsedCssCache != null && parsedCssCache.getCapacity() != 0; } }
protected boolean shouldCache() { return documentCache != null && documentCache.getCapacity() != 0; }
protected boolean shouldCache() { return documentCache != null && documentCache.getCapacity() != 0; }
protected boolean shouldCache() { return documentCache != null && documentCache.getCapacity() != 0; }
private boolean shouldCache() { return parsedCssCache != null && parsedCssCache.getCapacity() != 0; }
private boolean shouldCache() { return parsedCssCache != null && parsedCssCache.getCapacity() != 0; }
private boolean shouldCache() { return parsedCssCache != null && parsedCssCache.getCapacity() != 0; }
@Test public void getNamedCache() throws Exception { Cache<String, String> cache = defaultProvider.createCache("testcache"); Cache<String, String> cache2 = defaultProvider.createCache("testcache"); Assert.assertNotNull(cache); Assert.assertEquals(cache, cache2); Assert.assertNull(cache.getElement("test")); cache.addElement("test", "value1"); Assert.assertEquals("value1", cache.getElement("test")); cache.removeElement("test"); Assert.assertNull(cache.getElement("test")); Assert.assertEquals(cache.getCapacity(), cache2.getCapacity()); Assert.assertEquals(cache.getSize(), cache2.getSize()); }
@Test public void getNamedCache() throws Exception { Cache<String, String> cache = defaultProvider.createCache("testcache"); Cache<String, String> cache2 = defaultProvider.createCache("testcache"); Assert.assertNotNull(cache); Assert.assertEquals(cache, cache2); Assert.assertNull(cache.getElement("test")); cache.addElement("test", "value1"); Assert.assertEquals("value1", cache.getElement("test")); cache.removeElement("test"); Assert.assertNull(cache.getElement("test")); Assert.assertEquals(cache.getCapacity(), cache2.getCapacity()); Assert.assertEquals(cache.getSize(), cache2.getSize()); }
@Test public void getNamedCache() throws Exception { Cache<String, String> cache = defaultProvider.createCache("testcache"); Cache<String, String> cache2 = defaultProvider.createCache("testcache"); Assert.assertNotNull(cache); Assert.assertEquals(cache, cache2); Assert.assertNull(cache.getElement("test")); cache.addElement("test", "value1"); Assert.assertEquals("value1", cache.getElement("test")); cache.removeElement("test"); Assert.assertNull(cache.getElement("test")); Assert.assertEquals(cache.getCapacity(), cache2.getCapacity()); Assert.assertEquals(cache.getSize(), cache2.getSize()); }
@Test public void getNamedCache() throws Exception { Cache<String, String> cache = defaultProvider.createCache("testcache"); Cache<String, String> cache2 = defaultProvider.createCache("testcache"); Assert.assertNotNull(cache); Assert.assertEquals(cache, cache2); Assert.assertNull(cache.getElement("test")); cache.addElement("test", "value1"); Assert.assertEquals("value1", cache.getElement("test")); cache.removeElement("test"); Assert.assertNull(cache.getElement("test")); Assert.assertEquals(cache.getCapacity(), cache2.getCapacity()); Assert.assertEquals(cache.getSize(), cache2.getSize()); } }
@Test public void getNamedCache() throws Exception { Cache<String, String> cache = defaultProvider.createCache("testcache"); Cache<String, String> cache2 = defaultProvider.createCache("testcache"); Assert.assertNotNull(cache); Assert.assertEquals(cache, cache2); Assert.assertNull(cache.getElement("test")); cache.addElement("test", "value1"); Assert.assertEquals("value1", cache.getElement("test")); cache.removeElement("test"); Assert.assertNull(cache.getElement("test")); Assert.assertEquals(cache.getCapacity(), cache2.getCapacity()); Assert.assertEquals(cache.getSize(), cache2.getSize()); } }