星期六, 7月 16, 2011

PHP 效能 - 快取篇

  1. APC
  2. Memcache

何時用APC (獨立在一台server)
  • Application Settings
  • Configuration
  • Data is the same for each user
  • request都由同一台server responses(i.e sticky session)
  • file upload process & sessions (if using sticky session)
何時用Memcache (分散在不同的servers)
  • 當request不保證指向同server時
  • Data is specific or targeted to a user
  • User sessions

References

沒有留言: