By mxr10_ on
Hi team
I've created a custom module that has a controller that return a json,
but i would like to set 2 cache for two days,
Could that be posible?
Could you please help me?
Regards
Mario
Hi team
I've created a custom module that has a controller that return a json,
but i would like to set 2 cache for two days,
Could that be posible?
Could you please help me?
Regards
Mario
Comments
See A simple example Drupal
See A simple example Drupal Controller with a cached JSON Response.
But keep in mind that max-age does not work for anonymous users (for more details read Cache max-age).
That's a nice example.
That's a nice example.
Contact me to contract me for D7 -> D10/11 migrations.
thank you that help me
thank you that help me