Config variable does not exist I'm trying to set up caching and have it disabled for my local environment using {% cache unless craft.config.devMode %}. This works fine on non-local environments, but on my local environment I'm getting the error Method "devMode" for object "Craft\ConfigVariable" does not exist. Even though it does, this is my config file:

return array(
    '*' =&gt; array(
        'addTrailingSlashesToUrls' =&gt; true,
        'omitScriptNameInUrls' =&gt; true,
        'enableCsrfProtection' =&gt; true,
        'cpTrigger' =&gt; 'example-admin',
        'siteUrl' =&gt; (isset($_SERVER["HTTPS"]) &amp;&amp; $_SERVER["HTTPS"] == "on") ? "https://" : "http://" . $_SERVER['HTTP_HOST'],
        'environmentVariables' =&gt; array(
            'basePath' =&gt; $_SERVER['DOCUMENT_ROOT'] . '/data/uploads/',
            'baseURL' =&gt; (isset($_SERVER["HTTPS"]) &amp;&amp; $_SERVER["HTTPS"] == "on") ? "https://" : "http://" . $_SERVER['HTTP_HOST'] . '/data/uploads/',
        )
    ),
    '.local' =&gt; array(
        'devMode' =&gt; true
    )
);


If I {{ dump(craft.config.devMode) }} I get bool(true) so it is being set, it's just when being used in the cache conditional.
Looks like it was an issue with character encoding. I copied the {% cache unless craft.config.devMode %} from What are the best practices for using the {% cache %} tag?.

When I manually retyped out the conditional it worked properly.