<HTML ><HEAD ><TITLE >$cache_dir</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="Smarty Manual" HREF="index.html"><LINK REL="UP" TITLE="Smarty Class Variables" HREF="api.variables.html"><LINK REL="PREVIOUS" TITLE="$caching" HREF="variable.caching.html"><LINK REL="NEXT" TITLE="$cache_lifetime" HREF="variable.cache.lifetime.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=ISO-8859-1"></HEAD ><BODY CLASS="sect1" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >Smarty Manual</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="variable.caching.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" >Chapter 12. Smarty Class Variables</TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="variable.cache.lifetime.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="sect1" ><H1 CLASS="sect1" ><A NAME="variable.cache.dir" ></A >$cache_dir</H1 ><P > This is the name of the directory where template caches are stored. By default this is <TT CLASS="filename" >./cache</TT >, meaning that Smarty will look for the <TT CLASS="filename" >cache/</TT > directory in the same directory as the executing php script. <SPAN CLASS="bold" ><B CLASS="emphasis" >This directory must be writeable by the web server</B ></SPAN >, <A HREF="installing.smarty.basic.html" >see install</A > for more info. </P ><P > You can also use your own <A HREF="section.template.cache.handler.func.html" > custom cache handler</A > function to control cache files, which will ignore this setting. See also <A HREF="variable.use.sub.dirs.html" ><TT CLASS="parameter" ><I >$use_sub_dirs</I ></TT ></A >. </P ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >Technical Note: </B > This setting must be either a relative or absolute path. include_path is not used for writing files. </P ></BLOCKQUOTE ></DIV ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >Technical Note: </B > It is not recommended to put this directory under the web server document root. </P ></BLOCKQUOTE ></DIV ><P > See also <A HREF="variable.caching.html" ><TT CLASS="parameter" ><I >$caching</I ></TT ></A >, <A HREF="variable.use.sub.dirs.html" ><TT CLASS="parameter" ><I >$use_sub_dirs</I ></TT ></A >, <A HREF="variable.cache.lifetime.html" ><TT CLASS="parameter" ><I >$cache_lifetime</I ></TT ></A >, <A HREF="variable.cache.handler.func.html" ><TT CLASS="parameter" ><I >$cache_handler_func</I ></TT ></A >, <A HREF="variable.cache.modified.check.html" ><TT CLASS="parameter" ><I >$cache_modified_check</I ></TT ></A > and the <A HREF="caching.html" >caching section</A >. </P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="variable.caching.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="variable.cache.lifetime.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >$caching</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="api.variables.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >$cache_lifetime</TD ></TR ></TABLE ></DIV ></BODY ></HTML >