80 |
|
sub write() |
81 |
|
{ |
82 |
|
my ($cacheobject,$cachefilename) = @_; |
83 |
< |
|
83 |
> |
|
84 |
|
use Data::Dumper; |
85 |
|
use File::Copy; |
86 |
|
|
87 |
< |
print "[ CacheUtilities::write() ] Writing cache ",$cachefilename,"\n", if ($ENV{SCRAM_DEBUG}); |
87 |
> |
print "[ CacheUtilities::write() ] Writing cache ",$cachefilename,"\n", if ($ENV{SCRAM_DEBUG}); |
88 |
|
|
89 |
< |
# Rename the cache file to make a backup copy: |
89 |
> |
# Move the cache file to make a backup: |
90 |
|
move($cachefilename,$cachefilename.".bak") if ( -r $cachefilename); |
91 |
|
# Dump the cache to file: |
92 |
|
my $cachefh = IO::File->new($cachefilename, O_WRONLY|O_CREAT) |