Basic cache object for storing key-\/value pairs.\hypertarget{md_sfcode_node_modules_map_cache_README_autotoc_md16970}{}\doxysection{Install}\label{md_sfcode_node_modules_map_cache_README_autotoc_md16970}
Install with \href{https://www.npmjs.com/}{\texttt{ npm}}\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\$ npm install map-\/cache -\/-\/save }

\end{DoxyCode}


Based on Map\+Cache in Lo-\/dash v3.\+0. \href{https://github.com/lodash/lodash/blob/master/LICENSE.txt}{\texttt{ MIT License}}\hypertarget{md_sfcode_node_modules_map_cache_README_autotoc_md16971}{}\doxysection{Usage}\label{md_sfcode_node_modules_map_cache_README_autotoc_md16971}

\begin{DoxyCode}{0}
\DoxyCodeLine{var MapCache = require('map-\/cache');}
\DoxyCodeLine{var mapCache = new MapCache(); }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_map_cache_README_autotoc_md16972}{}\doxysection{API}\label{md_sfcode_node_modules_map_cache_README_autotoc_md16972}
\hypertarget{md_sfcode_node_modules_map_cache_README_autotoc_md16973}{}\doxysubsection{$<$a href=\char`\"{}index.\+js\#\+L28\char`\"{}$>$\+Map\+Cache$<$/a$>$}\label{md_sfcode_node_modules_map_cache_README_autotoc_md16973}
Creates a cache object to store key/value pairs.

{\bfseries{Example}}


\begin{DoxyCode}{0}
\DoxyCodeLine{var cache = new MapCache(); }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_map_cache_README_autotoc_md16974}{}\doxysubsection{$<$a href=\char`\"{}index.\+js\#\+L45\char`\"{}$>$.\+set$<$/a$>$}\label{md_sfcode_node_modules_map_cache_README_autotoc_md16974}
Adds {\ttfamily value} to {\ttfamily key} on the cache.

{\bfseries{Params}}


\begin{DoxyItemize}
\item {\ttfamily key} $\ast$$\ast$\{String\}$\ast$$\ast$\+: The key of the value to cache.
\item {\ttfamily value} $\ast$$\ast$\{any\}$\ast$$\ast$\+: The value to cache.
\item {\ttfamily returns} $\ast$$\ast$\{Object\}$\ast$$\ast$\+: Returns the {\ttfamily Cache} object for chaining.
\end{DoxyItemize}

{\bfseries{Example}}


\begin{DoxyCode}{0}
\DoxyCodeLine{cache.set('foo', 'bar'); }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_map_cache_README_autotoc_md16975}{}\doxysubsection{$<$a href=\char`\"{}index.\+js\#\+L65\char`\"{}$>$.\+get$<$/a$>$}\label{md_sfcode_node_modules_map_cache_README_autotoc_md16975}
Gets the cached value for {\ttfamily key}.

{\bfseries{Params}}


\begin{DoxyItemize}
\item {\ttfamily key} $\ast$$\ast$\{String\}$\ast$$\ast$\+: The key of the value to get.
\item {\ttfamily returns} $\ast$$\ast$\{any\}$\ast$$\ast$\+: Returns the cached value.
\end{DoxyItemize}

{\bfseries{Example}}


\begin{DoxyCode}{0}
\DoxyCodeLine{cache.get('foo');}
\DoxyCodeLine{//=> 'bar' }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_map_cache_README_autotoc_md16976}{}\doxysubsection{$<$a href=\char`\"{}index.\+js\#\+L82\char`\"{}$>$.\+has$<$/a$>$}\label{md_sfcode_node_modules_map_cache_README_autotoc_md16976}
Checks if a cached value for {\ttfamily key} exists.

{\bfseries{Params}}


\begin{DoxyItemize}
\item {\ttfamily key} $\ast$$\ast$\{String\}$\ast$$\ast$\+: The key of the entry to check.
\item {\ttfamily returns} $\ast$$\ast$\{Boolean\}$\ast$$\ast$\+: Returns {\ttfamily true} if an entry for {\ttfamily key} exists, else {\ttfamily false}.
\end{DoxyItemize}

{\bfseries{Example}}


\begin{DoxyCode}{0}
\DoxyCodeLine{cache.has('foo');}
\DoxyCodeLine{//=> true }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_map_cache_README_autotoc_md16977}{}\doxysubsection{$<$a href=\char`\"{}index.\+js\#\+L98\char`\"{}$>$.\+del$<$/a$>$}\label{md_sfcode_node_modules_map_cache_README_autotoc_md16977}
Removes {\ttfamily key} and its value from the cache.

{\bfseries{Params}}


\begin{DoxyItemize}
\item {\ttfamily key} $\ast$$\ast$\{String\}$\ast$$\ast$\+: The key of the value to remove.
\item {\ttfamily returns} $\ast$$\ast$\{Boolean\}$\ast$$\ast$\+: Returns {\ttfamily true} if the entry was removed successfully, else {\ttfamily false}.
\end{DoxyItemize}

{\bfseries{Example}}


\begin{DoxyCode}{0}
\DoxyCodeLine{cache.del('foo'); }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_map_cache_README_autotoc_md16978}{}\doxysection{Related projects}\label{md_sfcode_node_modules_map_cache_README_autotoc_md16978}
You might also be interested in these projects\+:


\begin{DoxyItemize}
\item \href{https://www.npmjs.com/package/cache-base}{\texttt{ cache-\/base}}\+: Basic object cache with {\ttfamily get}, {\ttfamily set}, {\ttfamily del}, and {\ttfamily has} methods for node.\+js/javascript projects. $\vert$ \href{https://github.com/jonschlinkert/cache-base}{\texttt{ homepage}}
\item \href{https://www.npmjs.com/package/config-cache}{\texttt{ config-\/cache}}\+: General purpose Java\+Script object storage methods. $\vert$ \href{https://github.com/jonschlinkert/config-cache}{\texttt{ homepage}}
\item \href{https://www.npmjs.com/package/option-cache}{\texttt{ option-\/cache}}\+: Simple API for managing options in Java\+Script applications. $\vert$ \href{https://github.com/jonschlinkert/option-cache}{\texttt{ homepage}}
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_map_cache_README_autotoc_md16979}{}\doxysection{Contributing}\label{md_sfcode_node_modules_map_cache_README_autotoc_md16979}
Pull requests and stars are always welcome. For bugs and feature requests, \href{https://github.com/jonschlinkert/map-cache/issues/new}{\texttt{ please create an issue}}.\hypertarget{md_sfcode_node_modules_map_cache_README_autotoc_md16980}{}\doxysection{Building docs}\label{md_sfcode_node_modules_map_cache_README_autotoc_md16980}
Generate readme and API documentation with \href{https://github.com/verbose/verb}{\texttt{ verb}}\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\$ npm install verb \&\& npm run docs }

\end{DoxyCode}


Or, if \href{https://github.com/verbose/verb}{\texttt{ verb}} is installed globally\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\$ verb }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_map_cache_README_autotoc_md16981}{}\doxysection{Running tests}\label{md_sfcode_node_modules_map_cache_README_autotoc_md16981}
Install dev dependencies\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\$ npm install -\/d \&\& npm test }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_map_cache_README_autotoc_md16982}{}\doxysection{Author}\label{md_sfcode_node_modules_map_cache_README_autotoc_md16982}
{\bfseries{Jon Schlinkert}}


\begin{DoxyItemize}
\item \href{https://github.com/jonschlinkert}{\texttt{ github/jonschlinkert}}
\item \href{http://twitter.com/jonschlinkert}{\texttt{ twitter/jonschlinkert}}
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_map_cache_README_autotoc_md16983}{}\doxysection{License}\label{md_sfcode_node_modules_map_cache_README_autotoc_md16983}
Copyright © 2016, \href{https://github.com/jonschlinkert}{\texttt{ Jon Schlinkert}}. Released under the \href{https://github.com/jonschlinkert/map-cache/blob/master/LICENSE}{\texttt{ MIT license}}.

\DoxyHorRuler{0}


{\itshape This file was generated by \href{https://github.com/verbose/verb}{\texttt{ verb}}, v0.\+9.\+0, on May 10, 2016.} 