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

Cache clearing, update cache scope #46

Merged
merged 3 commits into from
Mar 25, 2021
Merged

Conversation

bridwell
Copy link
Contributor

Addresses #44

  • Adds methods for manually clearing caches
  • Adds method for changing the cache scope of a registered injectable/table/column

@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 96.813% when pulling 33dd405 on AZMAG:cache_clearing into 28f67c0 on UDST:master.

@bridwell
Copy link
Contributor Author

To manually clear a cache

# clear an injectable
orca.clear_injectable('my_injectable')

# clear an entire table
orca.clear_table('my_table')

# clear a single column
orca.clear_column('my_table', 'my_col') 

# clear all columns
orca.clear_columns('my_table')

# clear a subset of columns
orca.clear_columns('my_table', ['col1', 'col2'])

To change cache scope:

orca.update_injectable_scope('my_inj', 'iteration')
orca.update_table_scope('my_table', 'step')
orca.update_column_scope('my_table', 'my_column', 'step')

# omitting the scope or passing None turns caching off
orca.update_table_scope('my_table')

@hanase
Copy link
Contributor

hanase commented Nov 18, 2019

Thanks so much for the PR, Scott! This will solve my issue described in #44.

@smmaurer
Copy link
Member

Hi @bridwell, the cache management functionality in this PR is fantastic! Sorry for the long delay in merging it.

I'm going to merge it this week and then put out a v1.6 release of Orca -- I'll open a separate issue to discuss the release. cc @hanase @janowicz

Thanks again!

@smmaurer smmaurer mentioned this pull request Aug 17, 2020
6 tasks
@smmaurer smmaurer changed the base branch from master to dev March 25, 2021 19:41
@smmaurer smmaurer merged commit c5e3ffe into UDST:dev Mar 25, 2021
@smmaurer smmaurer mentioned this pull request Mar 26, 2021
@bridwell bridwell deleted the cache_clearing branch November 16, 2021 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants