upstream V3 development https://www.gnusocial.rocks/v3
Go to file
Evan Prodromou f246b8f2d7 cache noticesWithFriends in memcached
noticesWithFriends is turning out to be one of our most expensive
queries. The join is costly, and this method is hit over and over and
over by desktop clients and other API users.

So, I've added a first pass at caching the results. I store a "window"
of notices -- equal to the first 3 pages of notices, plus one for
pagination -- in the memcached cache. If with-friends notices are
requests, I fetch the whole window out of the cache and grab the slice
requested. If the requested notices are outside the window, we just do
the query. If there's nothing in the cache, we request the window and
store it, then return a slice.

I had to add a NoticeWrapper class that works like DB_DataObject
(well, just the fetch() part...) but just holds an array of notices
instead of a DB cursor.

Finally, saving a new notice blows away the caches for subscribed users.

darcs-hash:20080915065616-84dde-1b1e814c2294498a10b763b779cbb62c3f96aa84.gz
2008-09-15 02:56:16 -04:00
actions Fix typo in finishremotesubscribe 2008-09-04 16:19:21 -04:00
classes cache noticesWithFriends in memcached 2008-09-15 02:56:16 -04:00
db only use MyISAM for tables with fulltext indices 2008-09-15 01:39:55 -04:00
doc move README to main dir 2008-08-24 07:37:19 -04:00
extlib reconnect timeout 2008-09-02 13:22:56 -04:00
js Fix for reply arrow in profile page 2008-09-05 05:08:48 -04:00
lib cache noticesWithFriends in memcached 2008-09-15 02:56:16 -04:00
locale make settings and search menus localisable 2008-08-17 11:02:44 -04:00
scripts duplicate confirmation to avoid where clause 2008-09-13 12:43:33 -04:00
theme add edo's tagcloud code 2008-07-31 09:23:02 -04:00
COPYING license block for source code 2008-05-14 15:26:48 -04:00
README move README to main dir 2008-08-24 07:37:19 -04:00
config.php.sample update information about queues 2008-09-10 11:47:54 -04:00
htaccess.sample add a sample RewriteBase 2008-09-10 14:00:50 -04:00
index.php make init of lang environment happen earlier, or when user language may have changed 2008-08-05 23:45:15 -04:00

README

This package requires PHP 5.x and the following PHP Pear libraries:

- DB_DataObject http://pear.php.net/package/DB_DataObject
- Validate http://pear.php.net/package/Validate
- XMLWriter (built-in)
- Auth_Yadis from OpenIDEnabled (not the PEAR version!). I decided
  to use the openidenabled.com version since it's more widely
  implemented, seems to be better supported, and it may make sense to
  use the openidenabled.com libraries for OpenID auth sometime in the
  future. Note that this is no longer distributed separately; it's only
  in the openidenabled.com OpenID PHP tarball.
  http://openidenabled.com/php-openid/
- OAuth.php from http://oauth.googlecode.com/svn/code/php/
- markdown.php from http://michelf.com/projects/php-markdown/ 
- PEAR Mail, for sending out mail notifications
  http://pear.php.net/package/Mail
- PEAR Net_SMTP, if you use the SMTP factory for notifications
  http://pear.php.net/package/Net_SMTP
- xmpphp, the follow-up to Class.Jabber.php. Probably the best XMPP
  library available for PHP. http://xmpphp.googlecode.com/