| Conditions | 3 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 52 | public function getCacheLng($lang) |
||
| 53 | { |
||
| 54 | $cache_name = 'lng_'.$lang; |
||
| 55 | |||
| 56 | if (Cache::has($cache_name) && !empty(Cache::get($cache_name))) { |
||
| 57 | $data_cache = Cache::get($cache_name); |
||
| 58 | } else { |
||
| 59 | $data_cache = Cache::remember($cache_name, $this->cache_time_forever, function () use ($lang) { |
||
| 60 | return $this->getLng($lang); |
||
| 61 | }); |
||
| 62 | } |
||
| 63 | |||
| 64 | return $data_cache; |
||
| 65 | } |
||
| 67 |