caching gaussian kernel