```python
def new_cache(limit: int) -> dict:
    if not isinstance(limit, int) or limit <= 0:
        raise ValueError("Limit must be a positive integer")
    return {"limit": limit, "keys": [], "store": {}}

def cache_write(cache: dict, key: str, value: int) -> list:
    if not isinstance(key, str) or not key:
        raise ValueError("Key must be a non-empty string")
    
    if key in cache["store"]:
        cache["keys"].remove(key)
    elif len(cache["keys"]) == cache["limit"]:
        oldest_key = cache["keys"].pop(0)
        del cache["store"][oldest_key]
    
    cache["keys"].append(key)
    cache["store"][key] = value
    
    return [oldest_key] if oldest_key else []

def cache_read(cache: dict, key: str) -> int:
    if not isinstance(key, str) or not key:
        raise ValueError("Key must be a non-empty string")
    
    if key not in cache["store"]:
        raise ValueError(f"Key '{key}' not found in cache")
    
    cache["keys"].remove(key)
    cache["keys"].append(key)
    
    return cache["store"][key]
```