• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Require pagination with Memcache

Hello All,

I am new CodeIgniter. I have requirement where i do display list of users (say 100 users per page). If i have around 1 million of user then there would be few thousands of pages for user lists.

I want to implement Memcache with pagination i.e. if admin / site managers goes to 1st page it should cache that page and similarly if they keep checking other pages, all the pages should get cache.

In File cache, i saw something called group which will cache all the users pages under one group say "User". And if i delete "User" group it will delete all the pages under it.

Similarly i was thinking to implement same thing using Memcache. Is there any library which can provide me grouping functionality Or is there any other methods are there?
Reason for implementing the group functionality is that if any record gets added or removed then i also need to delete the entire cache. In this case i can only delete the group and the related pages under that group will get deleted automatically.

On my user list will have 4 columns Say 'firstname', 'DOB', 'Location', 'Role' and i can have sorting (ASC/DSC) functionality on each the coloumns. So if anyone clicking on sorting DSC and navigating to pages then it should cache those pages also. Here queries are
1) Is it correct to cache all the pages of sorting (ASC / DSC)? because there would be thousands of pages? and if i cache it then cached size would be very big Smile
2) I might have Filter too, so is right way to cache those filtered pages (with pagination) too?

Please give your recommendation and especially if any one has worked pagination with caching please share the document / code or any reference point.

Thanks a lot Smile in advance.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.