Index: /LATMOS-Accounts/import/epo.pl
===================================================================
--- /LATMOS-Accounts/import/epo.pl	(revision 566)
+++ /LATMOS-Accounts/import/epo.pl	(revision 567)
@@ -14,5 +14,5 @@
 my $otype ||= 'user';
 
-my $LA = LATMOS::Accounts->new($config);
+my $LA = LATMOS::Accounts->new($config, noacl => 1);
 my $labase = $base ? $LA->base($base) : $LA->default_base;
 $labase->{wexported} = 1;
@@ -24,5 +24,5 @@
 
     my @passwd = split("\t", $line);
-    warn (join(' - ', map { $_ => $passwd[$_] } 0 ..$#passwd));
+    # warn (join(' - ', map { $_ => $passwd[$_] } 0 ..$#passwd));
     my @epo;
 
@@ -31,8 +31,8 @@
         cgranier => 'clg',
         vernier => 'jeanpaul82',
-    }->{$passwd[22]} || $passwd[22];
+    }->{$passwd[27]} || $passwd[27];
     my $obj = $labase->get_object($otype, $login) or do {
         warn "Cannot get $login user";
-        warn $line . "\n";
+        #warn $line . "\n";
         next;
     };
@@ -51,9 +51,4 @@
         $changes{mail} = $passwd[9];
         $changes{mail} =~ s/cetp.ipsl.fr/latmos.ipsl.fr/;
-        if ($passwd[13] !~ /1900\d\d\d\d/) {
-            $changes{birthDate} = $passwd[13];
-            $changes{birthDate} =~ s/^N//;
-            $changes{birthDate} .= '120000Z';
-        }
     }
 
@@ -64,11 +59,15 @@
         }
 
-        foreach my $col (3, 5) {
+
+        foreach my $col (3, 5, 7) {
             if($passwd[$col] ne 'AJETER') {
                 my %param = (user => $obj->id,);
-                $passwd[$col] =~ /^(SAV|SAJ|vel|StM)-(.*)/i;
+                $passwd[$col] =~ /^(SAV|SAJ|vel|StM|GY)-(.*)/i or do {
+                    warn "unknown $passwd[$col]";
+                    next;
+                };
                 my $eposite = $1;
                 $param{physicalDeliveryOfficeName} = $2;
-                $param{telephoneNumber} = '+33 1 ' . $passwd[$col + 3];
+                $param{telephoneNumber} = '+33 1 ' . $passwd[$col + 5];
 
                 for ($eposite) {
@@ -87,7 +86,12 @@
                         last;
                     };
-                    /^SAJ$/ and do {
+                    /^SAJ$/i and do {
                         $param{site} = 'Jussieu';
                         $passwd[14] =~ /aero$/ and $param{isMainAddress} = 1;
+                        last;
+                    };
+                    /^GY$/i and do {
+                        $param{site} = 'Guyancourt';
+                        # is not main address at time
                         last;
                     };
@@ -101,5 +105,5 @@
             }
         }
-        $passwd[12] =~ /^T(\d\d\d\d)(\d\d)(\d\d)$/ and do {
+        $passwd[16] =~ /^T(\d\d\d\d)(\d\d)(\d\d)$/ and do {
             if($1 < 2100) {
                 $changes{expire} = "$3/$2/$1 23:59:59";
@@ -108,5 +112,5 @@
             }
         };
-        $passwd[17] =~ /^GRADE(.*)/ and do {
+        $passwd[22] =~ /^GRADE(.*)/ and do {
             $changes{grade} = $1;
         };
@@ -115,5 +119,6 @@
     {
         my @group = @{ $obj->get_c_field('memberOf') || []};
-        foreach ($passwd[15] =~ /^DOM(.*)/g) {
+        foreach ($passwd[20] =~ /^DOM(.*)/g) {
+            $changes{departement} = '$1';
             push @group, $1;
             next;
Index: /LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql.pm
===================================================================
--- /LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql.pm	(revision 566)
+++ /LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql.pm	(revision 567)
@@ -98,4 +98,5 @@
         $self->log(LA_DEBUG, 'DB::COMMIT');
     }
+    $self->{__cache} = undef;
     $self->db->commit;
 }
@@ -109,4 +110,5 @@
         $self->log(LA_DEBUG, 'DB::ROLLBACK');
     }
+    $self->{__cache} = undef;
     $self->db->rollback;
 }
Index: /LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/objects.pm
===================================================================
--- /LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/objects.pm	(revision 566)
+++ /LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/objects.pm	(revision 567)
@@ -91,4 +91,7 @@
 sub _inline_fields {
     my ($self, $for, $base) = @_;
+    if ($base->{__cache}{$self->object_table}) {
+        return %{$base->{__cache}{$self->object_table}};
+    }
     my @res;
     my $sth = $base->db->prepare(
@@ -105,4 +108,5 @@
     }
     my %fields = map { $_ => $_ } @res;
+    $base->{__cache}{$self->object_table} = \%fields;
     %fields
 }
@@ -122,4 +126,8 @@
     my @attr;
     if ($class->has_extended_attributes) {
+        if ($base->{__cache}{_extended_field}{$class}) {
+            return map { $_ => $_ }
+               @{$base->{__cache}{_extended_field}{$class}};
+        }
         my $sth = $base->db->prepare_cached(
             sprintf(
@@ -132,4 +140,5 @@
             push(@attr, $res->{canonical});
         }
+        $base->{__cache}{_extended_field}{$class} = \@attr;
         return map { $_ => $_ } @attr;
     } else {
