Problem: M._cache = cache_data captured the initial empty table reference at module load time. After M.load() reassigns cache_data to the decoded JSON, M._cache is permanently stale and returns the wrong table. Solution: remove the field assignment and expose get_raw_cache() which closes over cache_data and always returns the current table. |
||
|---|---|---|
| .. | ||
| cp | ||