Fixes http://jira.grails.org/browse/GPCACHEEHCACHE-5

I was working on fixing this locally for my application and used this fix which is similar to the way that the main grails plugin cache plugin synchronizes access to on-demand cache creation.