Skip to content

Cannot have bool? as a property type when using RedisCache #48

@megyfexid

Description

@megyfexid

If you try to use bool? as a property type it breaks RedisCache:
3/09/2017 1:01:42 PM RedisTableCache(Customer) : Failed to load index (:Author Equal 1) from cache. Linq2DynamoDb.DataContext.Caching.Redis.RedisCacheException: Index is being rebuilt
at Linq2DynamoDb.DataContext.Caching.Redis.RedisTableCache.RedisIndex.LoadIndexEntities(RedisWrapper redis, String indexKey, String indexListKey)
at Linq2DynamoDb.DataContext.Caching.Redis.RedisTableCache.GetEntities(SearchConditions searchConditions, IEnumerable`1 projectedFields, String orderByFieldName, Boolean orderByDesc)
3/09/2017 1:01:43 PM RedisTableCache(Customer) : Index (Author Equal 1) was marked as being rebuilt
Customer : DynamoDb index query: SELECT * FROM Customer WHERE Author Equal 1. Index name: AuthorIndex

It will always say "Index is being rebuilt" doesn't matter how many times you reload for DynamoDb.

The workaround at the moment is to use string instead of bool?.

Nullable types make for very efficient Global Secondary Indexes and is a recommended best practice for dynamodb.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions