I am facing a strange “caching” problem that I can’t solve. I’ve read (almost) all the posts related to Hugo server caching, but none of them shed any light on what I am experiencing. To illustrate, I attach two images.
This first image above shows the code in VS Code. You can see the title of the page “Literature Search Tool Bing Bang Boom” and the date set to today (2015-01-29). Also visible is my command to start the server hugo server -ignoreCache -D
that builds 246 pages. Now the second image
Here you can see the page being loaded from localhost:1313/litsearch/
in Firefox. The Disable Cache checkbox is checked in web tools. The page rendered, however, is from January 17, 2025, and is titled “Literature Search Tool” (it is missing the “Bing Bang Boom” bit that I added to prove that Hugo is not building the latest changes).
It is entirely possible I am doing something really stupid. I would be very grateful if someone can point me to the error of my ways.
Many thanks,
Update: I should add that this was all working fine until a few hours ago. I was working on a branch, I went back to the main branch, made some updates, committed the changes, came back to my dev branch and started noticing this anomaly. To troubleshoot, I went back to the main branch, merged it with the dev branch, and tested from there but got the same problem (in the images above I am serving from the main branch). I don’t know if the problem is related to git branches. I can’t solve it.
Update 2: I have no idea what I did but I changed back to the dev branch again and restarted hugo server, and this time it built 255 pages
➜ plaziWebsite git:(batlit) hugo server -D
WARN Unknown kind "ignorelogs" in outputs configuration.
Watching for changes in /Users/punkish/Projects/plaziWebsite/{archetypes,assets,content,data,i18n,layouts,static}
Watching for config changes in /Users/punkish/Projects/plaziWebsite/config/_default
Start building sites …
hugo v0.134.2+extended darwin/arm64 BuildDate=unknown VendorInfo=macports
| EN
-------------------+------
Pages | 255
Paginator pages | 12
Non-page files | 109
Static files | 27
Processed images | 0
Aliases | 49
Cleaned | 0
And now I can see the changes. I have no idea why it was building only 246 pages earlier. But, I can now move on to bigger things, so I am gonna close this question.
Note: I realize I don’t know how to “close” this question. I can delete it completely, but that is not usually good practice. Perhaps a moderator can close this question.