ClearCache() static private method

static private ClearCache ( ) : void
return void
Beispiel #1
0
        override internal void ClearPersistentData()
        {
            if (eventStore != null)
            {
                eventStore.ClearAll();
            }

            Engage.ClearCache();
        }
        /// <summary>
        /// Clears the persistent data, such as user id. The SDK should be stopped
        /// before this method is called.
        ///
        /// Useful for testing purposes.
        /// </summary>
        public void ClearPersistentData()
        {
            if (HasStarted)
            {
                Logger.LogWarning("SDK has not been stopped before clearing persistent data");
            }

            PlayerPrefs.DeleteKey(PF_KEY_USER_ID);

            if (this.eventStore != null)
            {
                this.eventStore.ClearAll();
            }

            Engage.ClearCache();
        }