mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
configDB.pm: remove experimental cache mechanism
git-svn-id: https://svn.fhem.de/fhem/trunk@16205 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
698c36367f
commit
9d621ca4bb
@ -126,6 +126,8 @@
|
|||||||
#
|
#
|
||||||
# 2017-08-31 - changed improve table_info for migration check
|
# 2017-08-31 - changed improve table_info for migration check
|
||||||
#
|
#
|
||||||
|
# 2018-02-17 - changed. remove experimenatal cache functions
|
||||||
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
@ -395,10 +397,10 @@ sub cfgDB_AttrRead($) {
|
|||||||
sub cfgDB_FileRead($) {
|
sub cfgDB_FileRead($) {
|
||||||
my ($filename) = @_;
|
my ($filename) = @_;
|
||||||
|
|
||||||
if ($configDB{cache}{$filename} && $configDB{attr}{useCache}) {
|
# if ($configDB{cache}{$filename} && $configDB{attr}{useCache}) {
|
||||||
Log3(undef, 4, "configDB serving from cache: $filename");
|
# Log3(undef, 4, "configDB serving from cache: $filename");
|
||||||
return (undef,split(/\n/,$configDB{cache}{$filename}));
|
# return (undef,split(/\n/,$configDB{cache}{$filename}));
|
||||||
}
|
# }
|
||||||
|
|
||||||
Log3(undef, 4, "configDB reading file: $filename");
|
Log3(undef, 4, "configDB reading file: $filename");
|
||||||
my ($err, @ret, $counter);
|
my ($err, @ret, $counter);
|
||||||
@ -411,10 +413,10 @@ sub cfgDB_FileRead($) {
|
|||||||
$blobContent = decode_base64($blobContent) if ($blobContent);
|
$blobContent = decode_base64($blobContent) if ($blobContent);
|
||||||
$counter = length($blobContent);
|
$counter = length($blobContent);
|
||||||
if($counter) {
|
if($counter) {
|
||||||
if ($configDB{attr}{useCache}) {
|
# if ($configDB{attr}{useCache}) {
|
||||||
Log3(undef,4,"configDB caching: $filename");
|
# Log3(undef,4,"configDB caching: $filename");
|
||||||
$configDB{cache}{$filename} = $blobContent;
|
# $configDB{cache}{$filename} = $blobContent;
|
||||||
}
|
# }
|
||||||
@ret = split(/\n/,$blobContent);
|
@ret = split(/\n/,$blobContent);
|
||||||
$err = "";
|
$err = "";
|
||||||
} else {
|
} else {
|
||||||
@ -425,10 +427,10 @@ sub cfgDB_FileRead($) {
|
|||||||
}
|
}
|
||||||
sub cfgDB_FileWrite($@) {
|
sub cfgDB_FileWrite($@) {
|
||||||
my ($filename,@content) = @_;
|
my ($filename,@content) = @_;
|
||||||
if ($configDB{attr}{useCache}) {
|
# if ($configDB{attr}{useCache}) {
|
||||||
Log3(undef,4,"configDB delete from cache: $filename");
|
# Log3(undef,4,"configDB delete from cache: $filename");
|
||||||
$configDB{cache}{$filename} = undef;
|
# $configDB{cache}{$filename} = undef;
|
||||||
}
|
# }
|
||||||
Log3(undef, 4, "configDB writing file: $filename");
|
Log3(undef, 4, "configDB writing file: $filename");
|
||||||
my $fhem_dbh = _cfgDB_Connect;
|
my $fhem_dbh = _cfgDB_Connect;
|
||||||
$fhem_dbh->do("delete from fhemb64filesave where filename = '$filename'");
|
$fhem_dbh->do("delete from fhemb64filesave where filename = '$filename'");
|
||||||
|
Loading…
Reference in New Issue
Block a user