How about generating a 'cache key', encrypting it using nip04, storing it locally, encrypting locally cached stuff with it, and then when you reload - decrypting only that key and then decrypting all the cached stuff?