Dưới đây là cách thiết lập cho trình duyệt cache các file tĩnh của CakePHP 2.x khi chạy với Nginx.
location ~ /(.+/)?(img|css|js|files|fonts)/(.*) {
access_log off;
expires 30d;
add_header Cache-Control public;
try_files $uri $uri/ /../plugin/$1webroot/$2/$3 /../../plugins/$1webroot/$2/$3 /index.php?url=$uri;
}