void set<T>(String key, T resource, {bool temp = true}) { final target = temp ? _temporary : _permanent; target[key] = resource; }