Added writing of cache for the site key