[Bps-public-commit] r11525 - in SVN-PropDB: .

jesse at bestpractical.com jesse at bestpractical.com
Fri Apr 4 23:00:02 EDT 2008


Author: jesse
Date: Fri Apr  4 22:59:59 2008
New Revision: 11525

Modified:
   SVN-PropDB/   (props changed)
   SVN-PropDB/lib/Prophet/Sync/Source/RT.pm

Log:
 r29221 at 68-246-40-124:  jesse | 2008-04-04 16:59:36 -1000
 * RT.pm notes


Modified: SVN-PropDB/lib/Prophet/Sync/Source/RT.pm
==============================================================================
--- SVN-PropDB/lib/Prophet/Sync/Source/RT.pm	(original)
+++ SVN-PropDB/lib/Prophet/Sync/Source/RT.pm	Fri Apr  4 22:59:59 2008
@@ -169,6 +169,10 @@
 }
 
 my $TICKET_CACHE = App::Cache->new( { ttl => 60 * 60 } );
+# This cache stores uuids for tickets we've synced from a remote RT
+# Basically, if we created the ticket to begin with, then we'll know its uuid
+# if we pulled the ticket from RT then its uuid will be generated based on a UUID-from-ticket-url scheme
+# This cache is PERMANENT. - aka not a cache but a mapping table
 
 sub remote_id_for_uuid {
     my ( $self, $uuid_for_remote_id ) = @_;
@@ -181,10 +185,7 @@
 
 sub uuid_for_remote_id {
     my ( $self, $id ) = @_;
-
-    return $TICKET_CACHE->get( $self->uuid . '-ticket-' . $id )
-        || $self->uuid_for_url( $self->rt_url . "/ticket/$id" ),
-        ;
+    return $TICKET_CACHE->get( $self->uuid . '-ticket-' . $id ) || $self->uuid_for_url( $self->rt_url . "/ticket/$id" );
 }
 
 sub record_pushed_ticket {



More information about the Bps-public-commit mailing list