Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
[MOD] Memcached addition for TorrentTrad
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / Torrent Trader / v3 Mods in Progress

2020-02-24 17:29:31
It depends on what the query does. If you have a set of users and then want to grab the "top 10 music affinity" with some of those friends, it is worth to have both cachings: - each friend (in fact, each user of the site) - the top 10 query for each user (space is cheaper than CPU time)

But in general it is worth to store in Memcached all individual entities that are going to be used frequently (either in the same code execution, or in subsequent requests or by other users). Then things like CPU or resource heavy queries and data processings either Memcached-them or delegate them to async. jobs instead of making them realtime (e.g. Top 10 site users doesn't needs to be realtime, can be updated hourly or daily). And of course taking into account that if you store and Memcached individual entities, you have to remove all referential integrity from the DB to be able to reuse them either individually or in groups.
2020-02-27 22:32:40
Its all on pause now, I can not seem to get $pager to work nicely with the memcached function. Until I do, its on pause and won't be encouraging the switch. Doesn't make sense if users can not use the pager.
2020-02-28 17:37:43
Thanks for the contribution, but...

May I ask this post to be moved to the Mods under development section.

Thanks.
If It Ain't Dutch, It Ain't Much!!
Unknown User
2020-03-04 14:23:32
"STorrents2020, post: 68027, member: 20382":

Its all on pause now, I can not seem to get $pager to work nicely with the memcached function. Until I do, its on pause and won't be encouraging the switch. Doesn't make sense if users can not use the pager.

Exactly this is meant to be used on static pages. i.e top torrents, faq, homepage, everywhere except dynamic pages such as torrent lists, commenttable, torrent details.

The pager works fine, but every page = new file in the memory.

I found a workaround to have all together, do not use md5 on name, just set the optional name for example:
return $this->obj->set('cache_all_torrents', $val, $expire);

It will always include new data and read the data from the file cache_all_torrents file from memcached (but the read / write will be consistently used) which is still not a good way.
2020-03-06 21:36:05
"shadows, post: 68092, member: 20311":

Exactly this is meant to be used on static pages. i.e top torrents, faq, homepage, everywhere except dynamic pages such as torrent lists, commenttable, torrent details.

The pager works fine, but every page = new file in the memory.

I found a workaround to have all together, do not use md5 on name, just set the optional name for example:
return $this->obj->set('cache_all_torrents', $val, $expire);

It will always include new data and read the data from the file cache_all_torrents file from memcached (but the read / write will be consistently used) which is still not a good way.


Well, it might be a step in the right direction..
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 1
  • Members: 0
  • Guests online: 1
  • Comments: 3
  • Messages: 1,728