AccidentCasesScoreConfigService.php 698 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace common\services;
  3. use Yii;
  4. class AccidentCasesScoreConfigService
  5. {
  6. public static $sourceDataListByAccidentIdCacheKey = "AccidentCasesScoreConfigUpdate";
  7. public static function getAccidentCasesScoreConfigUpdate()
  8. {
  9. $cache = Yii::$app->cache;
  10. return $cache->get(self::$sourceDataListByAccidentIdCacheKey);
  11. }
  12. public static function setAccidentCasesScoreConfigUpdate()
  13. {
  14. $cache = Yii::$app->cache;
  15. return $cache->set(self::$sourceDataListByAccidentIdCacheKey, 1);
  16. }
  17. public static function clearAccidentCasesScoreConfigUpdate()
  18. {
  19. Yii::$app->cache->delete(self::$sourceDataListByAccidentIdCacheKey);
  20. }
  21. }