| Total Complexity | 4 |
| Total Lines | 20 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php namespace GeneaLabs\LaravelModelCaching\Traits; |
||
| 3 | trait CachePrefixing |
||
| 4 | { |
||
| 5 | protected function getCachePrefix() : string |
||
| 6 | { |
||
| 7 | return "genealabs:laravel-model-caching:" |
||
| 8 | . $this->getDatabaseConnectionName() . ":" |
||
| 9 | . $this->getDatabaseName() . ":" |
||
| 10 | . (config("laravel-model-caching.cache-prefix") |
||
| 11 | ? config("laravel-model-caching.cache-prefix", "") . ":" |
||
| 12 | : ""); |
||
| 13 | } |
||
| 14 | |||
| 15 | protected function getDatabaseConnectionName() : string |
||
| 18 | } |
||
| 19 | |||
| 20 | protected function getDatabaseName() : string |
||
| 23 | } |
||
| 24 | } |
||
| 25 |