func (s *Cache) removeExpired() raiqub.LockStatus {
	writeLocked := false
	s.RLock()
	for i := range s.values {
		if s.values[i].IsExpired() {
			if !writeLocked {
				s.RUnlock()
				s.Lock()
				writeLocked = true
			}
			delete(s.values, i)
		}
	}

	if writeLocked {
		return raiqub.WriteLocked
	} else {
		return raiqub.ReadLocked
	}
}
func (s *Cache) removeExpired() raiqub.LockStatus {
	writeLocked := false
	s.RLock()
	for i := range s.values {
		if s.values[i].IsExpired() {
			if !writeLocked {
				s.RUnlock()
				s.Lock()
				writeLocked = true
			}
			delete(s.values, i)
		}
	}

	if writeLocked {
		return raiqub.WriteLocked
	} else {
		return raiqub.ReadLocked
	}
}
// removeExpired remove all expired values from current Cache instance list.
// Returns the locking status of current instance.