Skip to content

Commit 5c84d3b

Browse files
Merge pull request #138 from jamesmontemagno/autorebuild
AutoRebuildEnabled litedb
2 parents 785a467 + e0afd55 commit 5c84d3b

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

src/MonkeyCache.LiteDB/Barrel.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public class Barrel : IBarrel
1919
public static string ApplicationId { get; set; } = string.Empty;
2020
public static string EncryptionKey { get; set; } = string.Empty;
2121
public static bool Upgrade { get; set; } = false;
22+
public static bool AutoRebuildEnabled { get; set; } = false;
2223

2324
static readonly Lazy<string> baseCacheDir = new Lazy<string>(() =>
2425
{
@@ -67,6 +68,9 @@ public static IBarrel Create(string cacheDirectory, bool cache = false)
6768
if(Upgrade)
6869
path += "; Upgrade=true";
6970

71+
if (AutoRebuildEnabled)
72+
path += "; auto-rebuild=true";
73+
7074
db = new LiteDatabase(path);
7175
col = db.GetCollection<Banana>();
7276
}

src/MonkeyCache.LiteDB/MonkeyCache.LiteDB.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
</ItemGroup>
5151

5252
<ItemGroup>
53-
<PackageReference Include="LiteDB" Version="5.0.13" />
53+
<PackageReference Include="LiteDB" Version="5.0.19" />
5454
</ItemGroup>
5555

5656
<ItemGroup>

src/MonkeyCache.TestApp/MonkeyCache.TestApp.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="LiteDB" Version="5.0.13" />
8+
<PackageReference Include="LiteDB" Version="5.0.19" />
99
<PackageReference Include="sqlite-net-pcl" Version="1.8.116" />
1010
<PackageReference Include="Xamarin.Forms" Version="2.5.0.122203" />
1111
</ItemGroup>

0 commit comments

Comments
 (0)