Are there best practices for setting up file paths in Smarty to avoid caching issues?

When setting up file paths in Smarty, it is important to use absolute paths to avoid caching issues. This ensures that Smarty can locate the correct template files regardless of the current working directory. By using absolute paths, you can prevent caching problems that may arise when relative paths are used.

$smarty = new Smarty();
$smarty->setTemplateDir('/path/to/templates');
$smarty->setCompileDir('/path/to/templates_c');
$smarty->setCacheDir('/path/to/cache');