[bugfix] Issue #39
[bugfix] Issue #40
[bugfix] Issue #36
add cache debug