001package com.box.sdk;
002
003/**
004 * Implement this interface to provide a custom access token cache implementation for your environment.
005 *
006 * <p>For production applications it is recommended to use a distributed cache like Memcached or Redis, and to
007 * implement this interface to store and retrieve access tokens appropriately for your environment.</p>
008 */
009public interface IAccessTokenCache {
010
011    /**
012     * Get the access token information from the cache.
013     *
014     * @param key key to look for.
015     * @return access token information.
016     */
017    String get(String key);
018
019    /**
020     * Store the access token information in the cache.
021     *
022     * @param key   key to use.
023     * @param value access token information to store.
024     */
025    void put(String key, String value);
026}