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 using cached-permissions and cached-permissions-path CLI features #69

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dxu2-atlassian
Copy link
Contributor

@dxu2-atlassian dxu2-atlassian commented Mar 9, 2025

Adds the feature to enable the user to use previously cached permission mappings to decrease the runtime. Also has a feature to enable the user to designate where the cache files should be stored, otherwise will use defaults. Documentation is also updated.

@dxu2-atlassian dxu2-atlassian force-pushed the feat/EAS-2415 branch 2 times, most recently from aa03a01 to e7697b7 Compare March 9, 2025 05:02
@dxu2-atlassian dxu2-atlassian marked this pull request as ready for review March 9, 2025 05:45
@dxu2-atlassian dxu2-atlassian requested a review from jwong101 March 10, 2025 23:11

const CACHE_EXPIRATION: Duration = Duration::from_secs(60 * 60 * 24 * 7); // 1 week

fn default_cache_path() -> PathBuf {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If $HOME isn't set, then we probably shouldn't use the default path.

if duration < self.config.ttl {
return true;
} else {
println!(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should output to stderr, since it will clutter the output if someone redirects fsrt's output to a file or program.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants