Deleting a repository leaves row in cache_invalidation

Issue #171 resolved
Cory Davis created an issue

When a repository is deleted, all references to it in the database are removed except for a row in cache_invalidation. The row for the deleted repo does have cache_active set to 0 though.

Note: This may be by design--it is just something that I noticed while looking in the database (old test repos being referenced in cache_invalidation).

Version is actually 1.1.8 but the closest I can put on here is 1.1.7.

Comments (2)

  1. Marcin Kuzminski repo owner

    there are no foreign key for that table so it'll not be cleaned by cascade deletes.

    I treat it more like a key-value store to keep for global cache invalidation, currently it's used only by repos but in future i could maybe use it for other cache. The point is that it's safe to truncate that table, and it'll only be cluttered when there's a very high rotation (by deletes) of repositories. This table is not controlled by any constraints RC will check if key exists, if not it'll create one and mark the cache status.

  2. Log in to comment