Reads and caches the entire contents of a file until it is modified.\hypertarget{md_sfcode_node_modules_read_cache_README_autotoc_md23931}{}\doxysection{Install}\label{md_sfcode_node_modules_read_cache_README_autotoc_md23931}

\begin{DoxyCode}{0}
\DoxyCodeLine{\$ npm i read-\/cache }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_read_cache_README_autotoc_md23932}{}\doxysection{Usage}\label{md_sfcode_node_modules_read_cache_README_autotoc_md23932}

\begin{DoxyCode}{0}
\DoxyCodeLine{// foo.js}
\DoxyCodeLine{var readCache = require('read-\/cache');}
\DoxyCodeLine{}
\DoxyCodeLine{readCache('foo.js').then(function (contents) \{}
\DoxyCodeLine{    console.log(contents);}
\DoxyCodeLine{\}); }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_read_cache_README_autotoc_md23933}{}\doxysection{API}\label{md_sfcode_node_modules_read_cache_README_autotoc_md23933}
\hypertarget{md_sfcode_node_modules_read_cache_README_autotoc_md23934}{}\doxysubsection{read\+Cache(path\mbox{[}, encoding\mbox{]})}\label{md_sfcode_node_modules_read_cache_README_autotoc_md23934}
Returns a promise that resolves with the file\textquotesingle{}s contents.\hypertarget{md_sfcode_node_modules_read_cache_README_autotoc_md23935}{}\doxysubsection{read\+Cache.\+sync(path\mbox{[}, encoding\mbox{]})}\label{md_sfcode_node_modules_read_cache_README_autotoc_md23935}
Returns the content of the file.\hypertarget{md_sfcode_node_modules_read_cache_README_autotoc_md23936}{}\doxysubsection{read\+Cache.\+get(path\mbox{[}, encoding\mbox{]})}\label{md_sfcode_node_modules_read_cache_README_autotoc_md23936}
Returns the content of cached file or null.\hypertarget{md_sfcode_node_modules_read_cache_README_autotoc_md23937}{}\doxysubsection{read\+Cache.\+clear()}\label{md_sfcode_node_modules_read_cache_README_autotoc_md23937}
Clears the contents of the cache.\hypertarget{md_sfcode_node_modules_read_cache_README_autotoc_md23938}{}\doxysection{License}\label{md_sfcode_node_modules_read_cache_README_autotoc_md23938}
MIT © \href{mailto:trysound@yandex.ru}{\texttt{ Bogdan Chadkin}} 