---
name: "ACE_Caching_Strategy"
section: "3"
platform: "linux"
package: "libace-doc"
version: "5.0.7-4"
release: "Debian 2.2 (Potato)"
platforms: ["linux"]
url: "https://new.carta.tech/ACE_Caching_Strategy"
---

# ACE\_Caching\_Strategy(3)

This class is an abstract base class for a caching strategy.

## NAME

ACE\_Caching\_Strategy -  This class is an abstract base class for a caching strategy.

## SYNOPSIS

```
#include <ace/Caching_Strategies_T.h>
template<class ATTRIBUTES, class CACHING_UTILITY>
class ACE_Caching_Strategy
{
  public:
    virtual ~ACE_Caching_Strategy (void);
    virtual ATTRIBUTES attributes (void) = 0;
    virtual double purge_percent (void) = 0;
    virtual void purge_percent (double percentage) = 0;
    virtual int notify_bind (int result, const ATTRIBUTES &attr) = 0;
    virtual int notify_find (int result, ATTRIBUTES &attr) = 0;
    virtual int notify_unbind (
        int result,
        const ATTRIBUTES &attr
        ) = 0;
    virtual int notify_trybind (int result, ATTRIBUTES &attr) = 0;
    virtual int notify_rebind (
        int result,
        const ATTRIBUTES &attr
        ) = 0;
    virtual CACHING_UTILITY &caching_utility (void) = 0;
    virtual void dump (void) const = 0;
};
```

## DESCRIPTION

  This class consists of all the interfaces a caching strategy should have and is used in association with the ACE\_Caching\_Strategy\_Adaptor.

## Accessor methods for the percentage of entries to purge.

```
virtual double purge_percent (void) = 0;
```

```
virtual void purge_percent (double percentage) = 0;
```

## Strategy related Operations

```
virtual int notify_bind (int result, const ATTRIBUTES &attr) = 0;
```

This method acts as a notification about the CONTAINERs bind method call.

```
virtual int notify_find (int result, ATTRIBUTES &attr) = 0;
```

This method acts as a notification about the CONTAINERs find method call

```
virtual int notify_unbind (int result, const ATTRIBUTES &attr) = 0;
```

This method acts as a notification about the CONTAINERs unbind method call

```
virtual int notify_trybind (int result, ATTRIBUTES &attr) = 0;
```

This method acts as a notification about the CONTAINERs trybind method call

```
virtual int notify_rebind (int result, const ATTRIBUTES &attr) = 0;
```

This method acts as a notification about the CONTAINERs rebind method call

```
virtual CACHING_UTILITY &caching_utility (void) = 0;
```

Purge the cache.

```
virtual void dump (void) const = 0;
```

Dumps the state of the object.

## AUTHOR

Kirthika Parameswaran kirthika@cs.wustl.edu

## LIBRARY

ace
