Rule caching