CacheController.php 689 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /**
  3. * FecShop file.
  4. *
  5. * @link http://www.fecshop.com/
  6. * @copyright Copyright (c) 2016 FecShop Software LLC
  7. * @license http://www.fecshop.com/license/
  8. */
  9. namespace fecadmin\controllers;
  10. use Yii;
  11. use fec\helpers\CRequest;
  12. use fecadmin\FecadminbaseController;
  13. /**
  14. * @author Terry Zhao <2358269014@qq.com>
  15. * @since 1.0
  16. */
  17. class CacheController extends FecadminbaseController
  18. {
  19. # 刷新缓存
  20. public function actionIndex()
  21. {
  22. if(CRequest::param("method") == 'reflush'){
  23. $this->getBlock()->reflush();
  24. }
  25. $data = $this->getBlock()->getLastData();
  26. return $this->render($this->action->id,$data);
  27. }
  28. }