JDG Caching

Adding the new jdg cache.
Using the jdg cache unless we're building for development.
Can we extract this logic out to helper, as we repeat it *a lot*.