Add testcases for ADD caching (Issue #880).