madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r20413: LJSUP-10216: Memcache mark is fixed, changed time limitation

Committer: sbelyaev
LJSUP-10216
U   trunk/cgi-bin/LJ/DelayedEntry.pm
Modified: trunk/cgi-bin/LJ/DelayedEntry.pm
===================================================================
--- trunk/cgi-bin/LJ/DelayedEntry.pm	2011-10-24 09:34:07 UTC (rev 20412)
+++ trunk/cgi-bin/LJ/DelayedEntry.pm	2011-10-24 09:55:04 UTC (rev 20413)
@@ -79,8 +79,7 @@
                   "VALUES ($journalid, $delayedid, $qdata_ser)" );
 
     my $memcache_key = "delayed_entry:$journalid:$delayedid";
-    my $timelife = $rposttime - $rlogtime;
-    LJ::MemCache::set($memcache_key, $data_ser, $timelife);
+    LJ::MemCache::set($memcache_key, $data_ser, 3600);
 
     $self->{journal} = $opts->{journal};    
     $self->{posttime} = $opts->{posttime};
@@ -695,9 +694,8 @@
                         "WHERE journalid=$journalid AND delayedid=$delayedid", undef, $data_ser );
     $self->{data} = $req;
 
-    my $memcache_key = 'delayed_entry:$journalid:$delayedid';
-    my $timelife = $rposttime - $rlogtime;
-    LJ::MemCache::set($memcache_key, $data_ser, $timelife);
+    my $memcache_key = "delayed_entry:$journalid:$delayedid";
+    LJ::MemCache::set($memcache_key, $data_ser, 3600);
 }   
 
 sub update_tags {
@@ -785,8 +783,7 @@
                                               "WHERE journalid=$journalid AND ".
                                               "delayedid = $delayedid");
         return undef unless $data_ser;
-        my $timelife = LJ::TimeUtil::->mysqldate_to_time($opts->[3]) - time();
-        LJ::MemCache::set($memcache_key, $data_ser, $timelife);
+        LJ::MemCache::set($memcache_key, $data_ser, 3600);
     }
 
     my $self = bless {}, $class; 

Tags: livejournal, madeon, pm, sbelyaev
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments