[dw-free] Useful function to save typing.
[commit: http://hg.dwscoalition.org/dw-free/rev/230f04d75396]
Useful function to save typing.
Patch by
mark.
Files modified:
Useful function to save typing.
Patch by
![[staff profile]](https://www.dreamwidth.org/img/silk/identity/user_staff.png)
Files modified:
- cgi-bin/LJ/User.pm
-------------------------------------------------------------------------------- diff -r acdcb86168e5 -r 230f04d75396 cgi-bin/LJ/User.pm --- a/cgi-bin/LJ/User.pm Wed Apr 15 15:51:30 2009 +0000 +++ b/cgi-bin/LJ/User.pm Wed Apr 15 16:29:56 2009 +0000 @@ -1215,6 +1215,13 @@ sub memc_set { } +# deletes a predictably named item. usage: +# $u->memc_delete( key ); +sub memc_delete { + return LJ::MemCache::delete( [$_[0]->{userid}, "$_[1]:$_[0]->{userid}"] ); +} + + sub mysql_insertid { my $u = shift; if ($u->isa("LJ::User")) { --------------------------------------------------------------------------------