fix interrupted thread
replace Pair<String, ByteBuffer> with NamedKey
rework code pulling from cache to be more readable