#Express not using updated template file in production

3 messages · Page 1 of 1 (latest)

languid crane
#

I have a script that updates an HBS file, which then gets rendered like so:

    res.render('../_cache/homepage-1.hbs', {
        title: 'Home',
        style: 'home-new',
        projectSlug: 'homepage',
    });

this works perfectly in my dev environment.

in my production environment, it is not reading the updated hbs file. it's using whatever it what when the server started. I am sure the file is being updated, it just seems the server has a cached version or something, because it keeps on displaying the old one.

any idea what could be causing this?

#

like if edit homepage-1.hbs on my dev server and replace everything in it with "hi", when i next load the page it says "hi".

this is the behavoir ive come to expect. normally when i edit an .hbs file, next time i load the page it's already updated. even in production. i just tested it, and updating a different page makes the site update instantly. (like it seems like it's loading the file directly every time).

what could be different for this one file? or why does it act differently on my production server?

acoustic wyvern