class Service {
    private Db db;
    private Cache cache;

    Service(Db db, Cache cache) {
        this.db = db;
        this.cache = cache;
    }

    void save(String k) { db.write(k); }

    String load(String k) { return db.read(k); }

    void put(String k) { cache.set(k); }

    void evict(String k) { cache.drop(k); }

    void shadowed() {
        Db db = Db.temporary();
        db.write("scratch");
    }

    void delegates(String k) { save(k); }
}
