This is a temporary solution to the use of the shared cache. Ideally this cache should be per gl drawing context.