I have been using a Laravel website which I have cached with AWS CDN, which is working fine up to this stage.
However, when I cache PhP/controller files, it seems to work fine with those edge locations where DB is close, however users from other edge location is complaining about latency.
Lets say: Origin Serve / DB - is in Australia. So at edge locations near Australia, the website seems super fast.
However, at edge locations in other part Asia/Africa/Europe etc, the website has been working super slow.
Is my understanding correct that any dynamic files trying to connect to DB should not be cached as it increase the time of connections due to DB located far ?
I have tried to purge PHP/controller files, it has somehow improved but this could not ne a solution.