Changed the flag on notices that says whether the notice is local, so
that it's -1 for local-but-blacklisted. This should keep blacklisted
users off the public timeline.
darcs-hash:20081202184258-5ed1f-cd87ea5c528ea0c90cb31eeb59d4d1ba4f85e9ad.gz
We do some extra caching of streams, at ';last'. If a notice is
deleted, we need to blow those caches, too. So, this deletes them.
darcs-hash:20081124003240-84dde-aa4561e5e68b0ccc0598ac86294ea54f9be5775a.gz
On identi.ca, certain users (http://identi.ca/derricklo) publish 5-10
automated notices every half hour or hour. This can flood the public
stream, making it unreadable for casual readers.
We don't want to prevent anyone from using the site for personal use.
However, if their personal use clouds up the public space, we can
gently remove them from that public space without interfering with
their personal activity.
So: this change prevents selected people's notices from appearing in
the public stream. It's hand-configured by an administrator, and
probably doesn't scale beyond 10-20 blacklisted users. It's a stopgap
measure.
darcs-hash:20081120183722-84dde-8a8401fbcbb6abb60a8b36de249323586ea0b22c.gz
I moved the 4 streams for a user (with friends, faves, replies,
personal) into functions on the User object. Added a helper function
in Notice for making notice streams. Also, will fetch notice streams
out of the memcached server, if possible. Made the API, RSS, and HTML
output all use the same streams (hopefully cached).
Added some code to Notice to blow the cache when a notice is posted.
Also, added code to favor and disfavor actions to blow the faves
cache, too.
darcs-hash:20080928120119-5ed1f-ead542348bcd3cf315be6f42934353154402eb16.gz
I added a new class, Memcached_DataObject, that will (optionally)
fetch data out of a memcached server if it's available. This only
works on 'staticGet'.
Methods that write to the database (insert, update, delete) will clear
and set the cache correctly, too.
darcs-hash:20080926160941-5ed1f-922de078b4c1941853ad014edf9a17fae486f8cf.gz
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
* No need to check $source's value before inserting
* No need to update the notice if the $uri was known in advance
darcs-hash:20080902173804-57fc3-496ceaf8192694db43e62f7af1f57785a1a16a01.gz
Make "#sanfrancisco", "#SanFrancisco", "#san_francisco", "#San.Francisco", and "#SAN-FRANCISCO" all link to http://identi.ca/tag/sanfrancisco but preserve appearance
darcs-hash:20080901025932-e3c0d-c0a939eaf7e242d88cbcb0d651c9d53718c60a9d.gz
Make "#test", "#Test", and "#tEsT" all preserve appearance but link to the same tag
darcs-hash:20080901001241-e3c0d-b466f35f4f023c6c90a6d2817487c97be9a1bbca.gz