set up caching in SG Optimizer plugin