model: An experimental support for LFU replacement policy (need further adjustments)
diff --git a/utils/trie/freshness-policy.h b/utils/trie/freshness-policy.h
index e123d73..d22b624 100644
--- a/utils/trie/freshness-policy.h
+++ b/utils/trie/freshness-policy.h
@@ -53,14 +53,14 @@
template<class Base,
class Container,
class Hook>
- struct policy
+ struct policy
{
static Time& get_freshness (typename Container::iterator item)
{
return static_cast<typename policy_container::value_traits::hook_type*>
(policy_container::value_traits::to_node_ptr(*item))->timeWhenShouldExpire;
}
-
+
static const Time& get_freshness (typename Container::const_iterator item)
{
return static_cast<const typename policy_container::value_traits::hook_type*>
@@ -80,7 +80,7 @@
boost::intrusive::compare< MemberHookLess< Container > >,
Hook > policy_container;
-
+
class type : public policy_container
{
public:
@@ -96,9 +96,9 @@
inline void
update (typename parent_trie::iterator item)
{
- // do nothing. it's random policy
+ // do nothing
}
-
+
inline bool
insert (typename parent_trie::iterator item)
{
@@ -115,13 +115,13 @@
return true;
}
-
+
inline void
lookup (typename parent_trie::iterator item)
{
// do nothing. it's random policy
}
-
+
inline void
erase (typename parent_trie::iterator item)
{
@@ -152,7 +152,7 @@
private:
type () : base_(*((Base*)0)) { };
-
+
private:
Base &base_;
size_t max_size_;