aboutsummaryrefslogtreecommitdiffstats
path: root/lib/LXRng/Repo
diff options
context:
space:
mode:
authorArne Georg Gleditsch <argggh@lxr.linpro.no>2007-11-27 00:58:09 +0100
committerArne Georg Gleditsch <argggh@lxr.linpro.no>2007-11-27 00:58:09 +0100
commit905478e913aa51469c79f8a52d4f5e833004419b (patch)
tree1f5cf0bad631593cc5524fe8b7bc780bcef1b01a /lib/LXRng/Repo
parent0a7345dfa8a6d061e13394fdbe31c77231f1847c (diff)
Tune caching functionality a bit.
Diffstat (limited to 'lib/LXRng/Repo')
-rw-r--r--lib/LXRng/Repo/Git.pm6
-rw-r--r--lib/LXRng/Repo/Git/Directory.pm6
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/LXRng/Repo/Git.pm b/lib/LXRng/Repo/Git.pm
index 757da26..3619427 100644
--- a/lib/LXRng/Repo/Git.pm
+++ b/lib/LXRng/Repo/Git.pm
@@ -30,6 +30,12 @@ sub new {
return bless({root => $root, %args}, $class);
}
+sub cache_key {
+ my ($self) = @_;
+
+ return $$self{'root'};
+}
+
sub _release_timestamp {
my ($self, $release) = @_;
diff --git a/lib/LXRng/Repo/Git/Directory.pm b/lib/LXRng/Repo/Git/Directory.pm
index 592e608..1fdcc32 100644
--- a/lib/LXRng/Repo/Git/Directory.pm
+++ b/lib/LXRng/Repo/Git/Directory.pm
@@ -12,6 +12,12 @@ sub new {
$class);
}
+sub cache_key {
+ my ($self) = @_;
+
+ return $$self{'repo'}->cache_key.":".$$self{'ref'};
+}
+
sub time {
my ($self) = @_;