PHP long polling, without excessive database access

前端 未结 6 1278
無奈伤痛
無奈伤痛 2021-01-02 17:26

I\'ve always enjoyed the idea of long polling; on my development server I\'ve played with various notification / new post systems, each using javascript to hold a connection

6条回答
  •  离开以前
    2021-01-02 17:55

    Whenever you Insert or update your database create a cache for that field of the database. You can use any simple PHP based cache (http://hycus.com/2011/03/31/hcache-a-cache-system-for-php/).

    Then you can poll that cache continuously using JQUERY.

提交回复
热议问题