Validates if cache object is set

as stated by user rootbear in 
http://www.yiiframework.com/forum/index.php/topic/7522-http-headers-simple-question/page__view__findpost__p__172577