| Conditions | 7 |
| Paths | 9 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 38 | public function flushMemberCache($memberIDs = null) |
||
| 39 | { |
||
| 40 | if (!$this->cache) { |
||
| 41 | return; |
||
| 42 | } |
||
| 43 | |||
| 44 | // Hard flush, e.g. flush=1 |
||
| 45 | if (!$memberIDs) { |
||
| 46 | $this->cache->clear(); |
||
| 47 | } |
||
| 48 | |||
| 49 | if ($memberIDs && is_array($memberIDs)) { |
||
| 50 | foreach (self::$categories as $category) { |
||
| 51 | foreach ($memberIDs as $memberID) { |
||
| 52 | $key = $this->generateCacheKey($category, $memberID); |
||
| 53 | $this->cache->delete($key); |
||
| 54 | } |
||
| 69 |