Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add method to clear cache #15

Merged
merged 5 commits into from
Jan 30, 2023
Merged

Commits on Jan 30, 2023

  1. Refactor DbCommandPool.Use() to separate connection and command

    There are now two `Use()` overloads, one for the command + connection (existing)
    and one for the connection alone (new). The new one can be used when we need to
    borrow a connection from the shared pool but don't want to use it with a command
    from the command pool.
    mqudsi committed Jan 30, 2023
    Configuration menu
    Copy the full SHA
    9df3453 View commit details
    Browse the repository at this point in the history
  2. Added Clear method to SqliteCache.cs

    Mark Surrow authored and mqudsi committed Jan 30, 2023
    Configuration menu
    Copy the full SHA
    1a63b8e View commit details
    Browse the repository at this point in the history
  3. Implement Cache.Clear() without going through the command pool

    Implement `SqliteCache.Clear()` without going through the command pool, using
    the new `DbCommand.Use()` override that borrows a connection w/out a command,
    then creating the command and using it locally.
    
    Assuming that calls to `SqliteCache.Clear()` are not typically going to be in
    the hot path, this will reduce the memory usage by not leaving cached instances
    of the `DbCommand` around after the call.
    mqudsi committed Jan 30, 2023
    Configuration menu
    Copy the full SHA
    9c3ae37 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6da35eb View commit details
    Browse the repository at this point in the history
  5. fixup! Added Clear method to SqliteCache.cs

    Fix the clear cache test. The persistence test made no sense.
    mqudsi committed Jan 30, 2023
    Configuration menu
    Copy the full SHA
    db8aae3 View commit details
    Browse the repository at this point in the history