Tag Archives: get

CakePHP3 Cache Example – Using Curl to get a Web page contents


Heres a simple example of using the cache feature of cakephp. We want to grab a webpage contents from the web but we only want to do this once otherwise its going to be slow and waste resources.

The basic idea is that we check if the url is saved in cache, if it is then we read it in otherwise we must use curl to grab it.

CakePHP3’s Cache settings are in the config/app.php file;

 

 

CakePHP 3 Cache:
https://book.cakephp.org/3.0/en/core-libraries/caching.html

Cakephp3-form methods GET and POST

23666GET:
to set the method your form is send in cakephp3 as GET;

to get the Data sent via get in controller;

POST:

 

Forms in cakephp3:
http://book.cakephp.org/3.0/en/views/helpers/form.html