-
Notifications
You must be signed in to change notification settings - Fork 68
Open
Description
I have a wrapper for the cache layer that enforces a TTL on sets. Under some conditions which we haven't identified (Folsom 1.2.1, Oracle JDK1.8 in all cases, memcached 1.4.15 in Linux and memcached 1.5.13 in Mac), we have identified that TTL doesn't work properly in binary protocol, but works perfectly as expected for same test if I change the connection line from connectBinary to connectAscii. With connectBinary, it works well in some cases (a Ubuntu laptop with memcached 1.5.6) but not in others (Mac with memcached 1.5.13). This is the equivalent pseudo-code:
@Test
public void testExpiredKey() throws Exception {
int ttl = 5;
CacheClient<CachedValue> client = instanceClient(CachedValue.class, ttl);
String key = randomKey();
CachedValue value = randomValue();
client.put(key, value).join();
await().atMost(ttl * 2, TimeUnit.SECONDS).untilAsserted(() -> assertNull(client.get(key).join()));
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels