Best way to setup a variable for Global use in CodeIgniter?

后端 未结 1 907
故里飘歌
故里飘歌 2021-01-15 05:09

I\'m using CodeIgniter and I have user data that needs to be stored in some way then updated. Basic things like name, id, points, comment count etc

At the moment whe

相关标签:
1条回答
  • 2021-01-15 05:58

    Why can't you store the data in a database? If your worried about performance you could use something like Memcache or APC to cache it but it seems like comment count and points are data that need to persist between sessions.

    You would still need to write the data to the database as well as the cache but then you could read the data directly from the cache instead of querying for it.

    0 讨论(0)
提交回复
热议问题