Web Storage (localStorage, sessionStorage, cookies)

Which advanced storage pattern is implemented in this code?
class Storage {
  constructor(type = 'localStorage') {
    this.storage = window[type];
  }

  set(key, value, ttl = null) {
    const item = {
      value,
      timestamp: ttl ? Date.now() + ttl : null
    };
    this.storage.setItem(key, JSON.stringify(item));
  }

  get(key) {
    const item = JSON.parse(this.storage.getItem(key));
    if (!item) return null;
    if (item.timestamp && Date.now() > item.timestamp) {
      this.storage.removeItem(key);
      return null;
    }
    return item.value;
  }
}
Next Question (8/20)