You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since all requests are POST requests there is no "fpc" caching for magewire requests. But there are many use cases where it make sense to cache.
modals
infinite scroll
content blocks that are just deferred because they are slow (api calls for example)
A solution could be to add an interface which a magewire component could use.
<?php
interface CacheableInterface {
public function getCacheKey();
}
By default the cache key is a hash of the fingerprint. But if you want to cache multiple subsequent requests (paging,..) you could add the param to the hash.
To get the caching result as fast as possible the component should be resolved much earlier in magento .. where the fpc is processed. the caching result coud be saved in the block_html cache.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Since all requests are POST requests there is no "fpc" caching for magewire requests. But there are many use cases where it make sense to cache.
A solution could be to add an interface which a magewire component could use.
By default the cache key is a hash of the fingerprint. But if you want to cache multiple subsequent requests (paging,..) you could add the param to the hash.
To get the caching result as fast as possible the component should be resolved much earlier in magento .. where the fpc is processed. the caching result coud be saved in the block_html cache.
Beta Was this translation helpful? Give feedback.
All reactions