Skip to content

Commit

Permalink
Barrel API
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmontemagno committed Dec 6, 2017
1 parent 9babd96 commit 5c762d3
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -39,10 +39,10 @@ MonkeyCache will never delete data unless you want to, which is pretty nice inca

```csharp
//removes all data
await Barrel.EmptyExpiredAsync();
await Barrel.EmptyAsync();

//param list of keys to flush
await Barrel.EmptyExpiredAsync(key: url);
await Barrel.EmptyAsync(key: url);
```

Another goal of MonkeyCache is to offer a fast and native experience when storing and retrieving data from the Barrel.
36 changes: 36 additions & 0 deletions src/MonkeyCache/Barrel.cs
@@ -0,0 +1,36 @@
using System;
using System.Threading.Tasks;

namespace MonkeyCache
{
/// <summary>
/// A Barrel to throw all your bannanas in.
/// </summary>
public class Barrel
{
public async Task<T> GetAsync<T>(string key)
{
throw new NotImplementedException();
}

public async Task<bool> AddAsync<T>(string key, T data)
{
throw new NotImplementedException();
}

public bool IsExpired(string key)
{
throw new NotImplementedException();
}

public async Task<bool> EmptyAsync()
{
throw new NotImplementedException();
}

public async Task<bool> EmptyAsync(params string[] key)
{
throw new NotImplementedException();
}
}
}
8 changes: 0 additions & 8 deletions src/MonkeyCache/Class1.cs

This file was deleted.

1 change: 1 addition & 0 deletions src/MonkeyCache/MonkeyCache.csproj
Expand Up @@ -22,5 +22,6 @@

<ItemGroup>
<PackageReference Include="NuGet.Build.Packaging" Version="0.2.0" />
<PackageReference Include="sqlite-net-pcl" Version="1.4.118" />
</ItemGroup>
</Project>

0 comments on commit 5c762d3

Please sign in to comment.