Successfully reported this slideshow.
Your SlideShare is downloading. ×

Zend四十八手シリーズ Zend_Cache Zend_Paginator

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad

Check these out next

1 of 30 Ad

More Related Content

Slideshows for you (16)

Viewers also liked (20)

Advertisement

More from Yusuke Ando (20)

Recently uploaded (20)

Advertisement

Zend四十八手シリーズ Zend_Cache Zend_Paginator

  1. 1. Zend_Cache Zend_Paginator Z e n d 四 十 八 手 シ リ ーズ 2 0 1 2 / 5 / 2 4
  2. 2. PHPカンファレンス北海道2012 / Yusuke Ando (@yando)
  3. 3. ZFP70 Zend_Acl Zend_Dom Zend_Memory Zend_Tag Zend_Amf Zend_Exception Zend_Mime Zend_Test Zend_Application Zend_Feed Zend_Navigation Zend_Text Zend_Auth Zend_File Zend_Oauth Zend_TimeSync Zend_Barcode Zend_Filter Zend_OpenId Zend_Tool Zend_Cache Zend_Form Zend_Paginator Zend_Tool_Framework Zend_Captcha Zend_Gdata Zend_Pdf Zend_Tool_Project Zend_Cloud Zend_Http Zend_ProgressBar Zend_Translate Zend_CodeGenerator Zend_InfoCard Zend_Queue Zend_Uri Zend_Config Zend_Json Zend_Reflection Zend_Validate Zend_Config_Writer Zend_Layout Zend_Registry Zend_Version Zend_Console_Getopt Zend_Ldap Zend_Rest Zend_View Zend_Controller Zend_Loader Zend_Search_Lucene Zend_Wildfire Zend_Currency Zend_Locale Zend_Serializer Zend_XmlRpc Zend_Date Zend_Log Zend_Server ZendX_Console_Proces Zend_Db Zend_Mail Zend_Service s_Unix Zend_Debug Zend_Markup Zend_Session ZendX_JQuery Zend_Dojo Zend_Measure Zend_Soap
  4. 4. agenda Getting Data Zend_Cache Zend_Paginator
  5. 5. Getting Data 全件取得、全件表示 データが増えると見にくい データが大きいとバックエンドなどに負担
  6. 6. Solution データの取得頻度を減らす →キャッシュする データを小分けにして扱う →ページングする
  7. 7. Zend_Cache
  8. 8. Zend_Cache キャッシュ全体を管理するZend_Cache データの読み書きなどの アクセス手段を提供するFrontend 各種キャッシュエンジンはBackend
  9. 9. とりあえずの例
  10. 10. Frontendの技 レコードのタグ付け キャッシュの削除 出力キャッシュ 関数、メソッドキャッシュ ファイルのキャッシュ
  11. 11. タグを複数マークして削除などに利用する
  12. 12. 簡潔に使える
  13. 13. Backendの技 File ZendPlatform Sqlite TwoLevels Memcached ZendServer_Disk Apc ZendServer_ShMem Xcache Static だいたいよくあるパターン
  14. 14. これはキモい
  15. 15. ZFなら とりあえず便利に使えるので独自実装は避 ける Zend_Db_Tableなどもメタデータの キャッシュにZend_Cacheを使えます
  16. 16. by horiavarlan Zend_Paginator
  17. 17. Paginator データセットを分割してページ送りリンク と連携する 多様なデータに対応するアダプタ 表示系はZend_Viewとパーシャル
  18. 18. アダプタは色々
  19. 19. とりあえずの例
  20. 20. 実行結果
  21. 21. ページ送りリンク
  22. 22. 合体するしかない 特に考えてないが、常識的な処理に
  23. 23. ページ分け Adapter_Arrayに配列を渡しさえすれば ページングできる Zend_Db_Selectの場合も便利かも ※ビューまで引き回す必要あり
  24. 24. まとめ キャッシュもページングもよく出来ている Zend_Viewに依存している部分 ZendのMVCに沿っていればスムーズ そうじゃない場合は工夫
  25. 25. サンプル? https://github.com/yandod/php-form-sample

×