caching GMat