Added kernel cache to reduce computation on kernel