Skip to content

[Bug]: InvalidateAll only removes objects without a type, does not clear the cache #1129

@markuspalme

Description

@markuspalme

Describe the bug 🐞

The documentation for InvalidateAll states that the method Invalidates all entries in the cache (i.e. clear it). (see

/// Invalidate all entries in the cache (i.e. clear it). Note that
)

However, the implementation only removes entries where the TypeName is null:

var entries = sql.Table<CacheEntry>().Where(x => x.TypeName == null).ToList();

See https://github.com/reactiveui/Akavache/blob/98baa3926672bb0e62082ca97ffc058cad604b16/src/Akavache.Sqlite3/SqliteBlobCache.cs#L798C65-L798C88.

This is not clear from the documentation and I would expect all cache entries to be removed.

Step to reproduce

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Reproduction repository

https://github.com/reactiveui/ReactiveUI

Expected behavior

The cache should be cleared completely.

Screenshots 🖼️

No response

IDE

No response

Operating system

No response

Version

No response

Device

No response

ReactiveUI Version

No response

Additional information ℹ️

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions