Browse Source

policy_cache.hpp

getattr-cache
Antonio SJ Musumeci 10 months ago
parent
commit
5c09585801
  1. 14
      src/policy_cache.hpp

14
src/policy_cache.hpp

@ -18,32 +18,24 @@
#pragma once
#include "policy.hpp"
#include "strvec.hpp"
#include "nonstd/optional.hpp"
#include <cstdint>
#include <string>
#include <unordered_map>
#include <pthread.h>
class PolicyCache
{
public:
PolicyCache(void);
PolicyCache();
public:
insert
void erase(const char *fusepath);
void cleanup(const int prob = 1);
void clear(void);
public:
int operator()(const Policy::Search &policy,
const Branches &branches,
const char *fusepath,
StrVec *paths);
private:
unsigned _max_size;
std::unordered_map<std::string,std::string> _cache;

Loading…
Cancel
Save