requests through wp‑ajax - ivaldi · problem post requests to wp‑ajax.php are not cached by...

16
Requests through wp‑ajax.php How to speed it up...

Upload: truongduong

Post on 07-Nov-2018

218 views

Category:

Documents


0 download

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

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

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

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

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
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

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
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
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

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

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

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

'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

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

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

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

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