# | Line 43 | Line 43 | sub write() | |
---|---|---|
43 | use Data::Dumper; | |
44 | use File::Copy; | |
45 | ||
46 | + | print "[ CacheUtilities::write() ] Writing cache ",$cachefilename,"\n"; |
47 | + | |
48 | # Rename the cache file to make a backup copy: | |
49 | move($cachefilename,$cachefilename.".bak") if ( -r $cachefilename); | |
50 | # Dump the cache to file: | |
# | Line 56 | Line 58 | sub write() | |
58 | print $cachefh Dumper($cacheobject); | |
59 | close $cachefh; | |
60 | ||
61 | + | # Change the permissions to -rw-r--r--: |
62 | + | my $filemode = 0644; |
63 | + | chmod $filemode, $cachefilename; |
64 | + | |
65 | return; | |
66 | } | |
67 |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |