cache keygen example