Answer the question
In order to leave comments, you need to log in
Yii cache key access via url?
So you need to implement the following:
Yii writes data to the cache, and then the data should be available at:
site.ru/_stat/cache key
We have nginx as a server, os: centos.
So:
if(!Yii::app()->cache->set($GameProposalModel->proposal_id, 'renderTable('.json_encode($toCache).')'))
location /_stat {
set $memcached_key "$uri?$args";
memcached_pass 127.0.0.1:11211;
error_page 404 502 504 = @fallback;
add_header Content-Type "text/html; charset=utf-8";
}
location @fallback {
proxy_pass http://localhost:9000;
}
Answer the question
In order to leave comments, you need to log in
and since when is access to memcache going via http? there is a binary protocol.
You put data into the cache by the "30" key, and retrieve it by "$uri?$args" (site.ru/_stat/30). That is, you need to pull out 30 from uri and put it in $memcached_key.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question