requests through wp‑ajax - ivaldi · problem post requests to wp‑ajax.php are not cached by...
TRANSCRIPT
![Page 1: Requests through wp‑ajax - Ivaldi · Problem post requests to wp‑ajax.php are not cached by supercache or our cache server requests (depending on complexity) might take a while](https://reader031.vdocument.in/reader031/viewer/2022022706/5be23b7f09d3f288228c3f78/html5/thumbnails/1.jpg)
Requests through wp‑ajax.php
How to speed it up...
![Page 2: Requests through wp‑ajax - Ivaldi · Problem post requests to wp‑ajax.php are not cached by supercache or our cache server requests (depending on complexity) might take a while](https://reader031.vdocument.in/reader031/viewer/2022022706/5be23b7f09d3f288228c3f78/html5/thumbnails/2.jpg)
Problempost requests to wp‑ajax.php are not cached by supercache orour cache server
requests (depending on complexity) might take a while
![Page 3: Requests through wp‑ajax - Ivaldi · Problem post requests to wp‑ajax.php are not cached by supercache or our cache server requests (depending on complexity) might take a while](https://reader031.vdocument.in/reader031/viewer/2022022706/5be23b7f09d3f288228c3f78/html5/thumbnails/3.jpg)
Example
![Page 4: Requests through wp‑ajax - Ivaldi · Problem post requests to wp‑ajax.php are not cached by supercache or our cache server requests (depending on complexity) might take a while](https://reader031.vdocument.in/reader031/viewer/2022022706/5be23b7f09d3f288228c3f78/html5/thumbnails/4.jpg)
WP StructureCPT: location
TAX: location_region
CPT: event_type
CPT: location_filterTAX: location_people
TAX: location_surface
![Page 5: Requests through wp‑ajax - Ivaldi · Problem post requests to wp‑ajax.php are not cached by supercache or our cache server requests (depending on complexity) might take a while](https://reader031.vdocument.in/reader031/viewer/2022022706/5be23b7f09d3f288228c3f78/html5/thumbnails/5.jpg)
![Page 6: Requests through wp‑ajax - Ivaldi · Problem post requests to wp‑ajax.php are not cached by supercache or our cache server requests (depending on complexity) might take a while](https://reader031.vdocument.in/reader031/viewer/2022022706/5be23b7f09d3f288228c3f78/html5/thumbnails/6.jpg)
Requestaction:iv_location_filterdo:findEventsInRegionid:19
![Page 7: Requests through wp‑ajax - Ivaldi · Problem post requests to wp‑ajax.php are not cached by supercache or our cache server requests (depending on complexity) might take a while](https://reader031.vdocument.in/reader031/viewer/2022022706/5be23b7f09d3f288228c3f78/html5/thumbnails/7.jpg)
![Page 8: Requests through wp‑ajax - Ivaldi · Problem post requests to wp‑ajax.php are not cached by supercache or our cache server requests (depending on complexity) might take a while](https://reader031.vdocument.in/reader031/viewer/2022022706/5be23b7f09d3f288228c3f78/html5/thumbnails/8.jpg)
![Page 9: Requests through wp‑ajax - Ivaldi · Problem post requests to wp‑ajax.php are not cached by supercache or our cache server requests (depending on complexity) might take a while](https://reader031.vdocument.in/reader031/viewer/2022022706/5be23b7f09d3f288228c3f78/html5/thumbnails/9.jpg)
Should probably write a custom query,but anway...
![Page 10: Requests through wp‑ajax - Ivaldi · Problem post requests to wp‑ajax.php are not cached by supercache or our cache server requests (depending on complexity) might take a while](https://reader031.vdocument.in/reader031/viewer/2022022706/5be23b7f09d3f288228c3f78/html5/thumbnails/10.jpg)
No optimization
![Page 11: Requests through wp‑ajax - Ivaldi · Problem post requests to wp‑ajax.php are not cached by supercache or our cache server requests (depending on complexity) might take a while](https://reader031.vdocument.in/reader031/viewer/2022022706/5be23b7f09d3f288228c3f78/html5/thumbnails/11.jpg)
W3 Total cache with WP Object Cache
![Page 12: Requests through wp‑ajax - Ivaldi · Problem post requests to wp‑ajax.php are not cached by supercache or our cache server requests (depending on complexity) might take a while](https://reader031.vdocument.in/reader031/viewer/2022022706/5be23b7f09d3f288228c3f78/html5/thumbnails/12.jpg)
'Self made' option cache
![Page 13: Requests through wp‑ajax - Ivaldi · Problem post requests to wp‑ajax.php are not cached by supercache or our cache server requests (depending on complexity) might take a while](https://reader031.vdocument.in/reader031/viewer/2022022706/5be23b7f09d3f288228c3f78/html5/thumbnails/13.jpg)
iv‑minimal‑ajax.php
.. worse..
![Page 14: Requests through wp‑ajax - Ivaldi · Problem post requests to wp‑ajax.php are not cached by supercache or our cache server requests (depending on complexity) might take a while](https://reader031.vdocument.in/reader031/viewer/2022022706/5be23b7f09d3f288228c3f78/html5/thumbnails/14.jpg)
define( 'SHORTINIT', TRUE );and require needed files myself... (long list...)
![Page 15: Requests through wp‑ajax - Ivaldi · Problem post requests to wp‑ajax.php are not cached by supercache or our cache server requests (depending on complexity) might take a while](https://reader031.vdocument.in/reader031/viewer/2022022706/5be23b7f09d3f288228c3f78/html5/thumbnails/15.jpg)
Redis Object Cache
![Page 16: Requests through wp‑ajax - Ivaldi · Problem post requests to wp‑ajax.php are not cached by supercache or our cache server requests (depending on complexity) might take a while](https://reader031.vdocument.in/reader031/viewer/2022022706/5be23b7f09d3f288228c3f78/html5/thumbnails/16.jpg)
Conclusion2 to 3 times faster with object cache
haven't investigated possible downsides
quick win:do a GET‑request instead of a POST‑request
GET‑requests are cached by the caching server