mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-15 07:45:54 +01:00
Fixed issue where an exception is raised if KEYS() finds no matches and returns null (#733)
This commit is contained in:
parent
b9fcc04647
commit
ec5a804576
@ -265,14 +265,17 @@ end;
|
||||
|
||||
procedure TMVCCacheController.DeleteCacheKey(const AKey: string = '');
|
||||
var
|
||||
AKeys: TArray<string>;
|
||||
AKeys: TRedisArray;
|
||||
ARedis: IRedisClient;
|
||||
begin
|
||||
ARedis := RedisClient;
|
||||
if AKey <> '' then
|
||||
begin
|
||||
AKeys := ARedis.KEYS(AKey).ToArray;
|
||||
ARedis.DEL(AKeys);
|
||||
AKeys := ARedis.KEYS(AKey);
|
||||
if AKeys.HasValue then
|
||||
begin
|
||||
ARedis.DEL(AKeys.ToArray);
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user