added generic cache behaviour
added some implementations for gen_cache