File: CacheFactory.pm

package info (click to toggle)
sitescooper 3.1.2-1
  • links: PTS
  • area: main
  • in suites: sarge, woody
  • size: 3,000 kB
  • ctags: 662
  • sloc: perl: 8,677; makefile: 105
file content (53 lines) | stat: -rw-r--r-- 1,138 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#===========================================================================
# 

package Sitescooper::CacheFactory;

use Carp;
use Sitescooper::Main;

use Sitescooper::PerSiteCache;

@ISA = qw();
use vars qw{ @ISA };
use strict;

# ---------------------------------------------------------------------------

sub new {
  my $class = shift; $class = ref($class) || $class;

  my ($main) = @_;

  my $self = {
    'main'		=> $main,
  };

  bless ($self, $class);
  $self;
}

# ---------------------------------------------------------------------------

sub open_cache {
  my ($self) = @_;
  die "Unimplemented interface in CacheFactory";
}

sub close_cache {
  my ($self) = @_;
  die "Unimplemented interface in CacheFactory";
}

# should return an object of type Sitescooper::PerSiteCache
# to allow scooping one site. Once it's finished with, it's commit()
# method will be called to commit changes to the storage in this
# Factory object.
sub get_per_site_cache {
  my ($self, $robot, $sitename) = @_;
  die "Unimplemented interface in CacheFactory";
}

# ---------------------------------------------------------------------------

1;