I use Angular 5.2.7 with Angular Service Worker 5.2.7.
I want to cache webservices calls. So, I've got with this config in my ngsw-config.json, for dataGroups :
"dataGroups": [{
"name": "tasks-users-api",
"urls": ["/api", "/rest"],
"cacheConfig": {
"strategy": "freshness",
"maxSize": 20000,
"maxAge": "1h",
"timeout": "5s"
}
}]
I try to cache this two URLs : https://randomuser.me/api/?results=20 ---> It's OK https://test.moodlecloud.com/webservice/rest/server.php ---> It's KO
The first one is cached as expected. It's a simple GET service. The second one isn't. It's a POST service with a form data sent as payload.
Any idea of what is wrong with that ?