(cacheArray []any)
| 335 | } |
| 336 | |
| 337 | func parseCacheMemoryEntries(cacheArray []any) ([]CacheMemoryEntry, error) { |
| 338 | cacheLog.Printf("Processing cache array with %d entries", len(cacheArray)) |
| 339 | entries := make([]CacheMemoryEntry, 0, len(cacheArray)) |
| 340 | for _, item := range cacheArray { |
| 341 | cacheMap, ok := item.(map[string]any) |
| 342 | if !ok { |
| 343 | continue |
| 344 | } |
| 345 | entry, err := parseCacheMemoryEntry(cacheMap, "default") |
| 346 | if err != nil { |
| 347 | return nil, err |
| 348 | } |
| 349 | entries = append(entries, entry) |
| 350 | } |
| 351 | if err := validateNoDuplicateCacheIDs(entries); err != nil { |
| 352 | return nil, err |
| 353 | } |
| 354 | return entries, nil |
| 355 | } |
| 356 | |
| 357 | // extractCacheMemoryConfigFromMap is a backward compatibility wrapper for extractCacheMemoryConfig |
| 358 | // extractCacheMemoryConfigFromMap is a backward compatibility wrapper for extractCacheMemoryConfig |
no test coverage detected