I have a VPS where I work with Nginx, PHP and MariaDB.
I also have an application, a news site, where I have on the homepage, some ads that should be counted with each +1 pageviews update. I do this for the UPDATE of the PDO.
It turns out that because I'm working with caching, these updates are not being counted. Has anyone ever had this problem? If yes, how did they resolve?
Should I work with ajax requests for a page and on that page put a Header to not generate cache?
Note: I've tried to put the header for no-cache on the homepage, but the page would be vulnerable to attack.