// ParseKey gets compound key created by Key func and split it to the actual key and scopes
ParseKey gets compound key created by Key func and split it to the actual key and scopes
// ParseKey gets compound key created by Key func and split it to the actual key and scopes
func ParseKey(fullKey string) (key string, scopes []string, err error) {
	elems := strings.Split(fullKey, "@@")
	if len(elems) != 2 {
		return "", nil, errors.Errorf("can't parse cache key %s", key)
	}
	scopes = strings.Split(elems[0], "$$")
	if len(scopes) == 1 && scopes[0] == "" {
		scopes = []string{}
	}
	key = elems[1]
	return key, scopes, nil
}
func ParseKey ( fullKey string ) ( key string , scopes [ ] string , err error ) { elems := strings . Split ( fullKey , " " ) if len ( elems ) != 2 { return " " , nil , errors . Errorf ( " " , key ) } scopes = strings . Split ( elems [ 0 ] , " " ) if len ( scopes ) == 1 && scopes [ 0 ] == " " { scopes = [ ] string { } } key = elems [ 1 ] return key , scopes , nil }
ParseKey gets compound key created by Key func and split it to the actual key and scopes
ParseKey gets compound key created by Key func and split it to the actual key and scopes