preliminary version of GP caching