This solution only works if Caching is first enabled on the item. This code would be improved if the call to enable caching was also included, otherwise the CreateCacheRefreshPlan() call throws an exception: Caching must be enabled first.
↧