python - 在django中使用缓存来加速(memcached)困惑?
ringa_lee
ringa_lee 2017-04-18 10:03:28
0
2
601
ringa_lee
ringa_lee

ringa_lee

reply all(2)
伊谢尔伦

1) If the page is not updated frequently, obviously the first method is more convenient
2) The memory limit of memcache depends on your physical machine, but there are some usage scenarios of memcache that need to be paid attention to, which may cause performance degradation
3) Memcache saves keys Value data, for Django, is that the HttpResponse corresponding to each URL is cached. The previous process is
1) Django view obtains data from DB through Models
2) Then calls template to render to form a real HttpResponse
3) Pass Http Socket writes the data back to the client
With memcache, the above 1 and 2 are omitted. The saved HttpResponse is directly taken out from the cache pool according to the URL and returned to the client

阿神

Like it, although I have never used cache in django.
But I still want to say that this is the correct idea and format for asking questions.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!