```python
def new_cache(limit: int) -> dict:
    """Create a new recency cache with the specified limit."""
    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:
    """Write a value to the cache, evicting the least recently used if necessary."""
    if not isinstance(key, str) or len(key) == 0:
        raise ValueError("key must be a non-empty string")
    
    limit = cache["limit"]
    keys = cache["keys"]
    store = cache["store"]
    
    if key in store:
        # Key exists: update value and move to most recently touched
        store[key] = value
        keys.remove(key)
        keys.append(key)
        return []
    else:
        # New key
        if len(keys) == limit:
            # Evict least recently touched (first in list)
            evicted_key = keys.pop(0)
            del store[evicted_key]
            return [evicted_key]
        else:
            # Cache has space
            keys.append(key)
            store[key] = value
            return []


def cache_read(cache: dict, key: str) -> int:
    """Read a value from the cache, moving the key to most recently touched."""
    if not isinstance(key, str) or len(key) == 0:
        raise ValueError("key must be a non-empty string")
    
    if key not in cache["store"]:
        raise KeyError(f"key '{key}' not found in cache")
    
    keys = cache["keys"]
    keys.remove(key)
    keys.append(key)
    
    return cache["store"][key]
```