Experiment JS Client Documentation - v1.23.0
    Preparing search index...

    Class MemoryStorage

    In-memory Storage for the web experiment variant/flag caches (amp-exp-*), injected by experiment-tag while cookie consent has not been granted so the caches never touch sessionStorage pre-consent. The storage is chosen once at client construction: after a mid-session grant the cache stays in memory for the page lifetime and reverts to SessionStorage on the next load — acceptable because it is a cache that repopulates on fetch.

    Implements

    • Storage
    Index

    Constructors

    Methods

    Constructors

    Methods

    • Parameters

      • key: string

      Returns void

    • Parameters

      • key: string

      Returns string

    • Parameters

      • key: string
      • value: string

      Returns void