leonibr / community-extensions-cache-postgres

A PostgreSQL Implementation of IDistributedCache interface. Using Postgresql as distributed cache in Asp.Net Core. NetStandard 2.0
54 stars 17 forks source link

Table name and Schema in Configuration Settings should accept any form of case #13

Open matt748 opened 2 years ago

matt748 commented 2 years ago

I have tried to set this up and use HttpContext.Session (like you can with Redis) but nothing is stored/retrieved, any ideas? Is there some extra configuration required to enable this or is it not supported?

leonibr commented 2 years ago

Sorry, it does not go outside IDistributedCache implementation

matt748 commented 2 years ago

I have managed to get it working now, and it does work out of the box, it just doesn't bubble any errors up if theres an issue when interacting via the session. I had set up the configuration to use camel casing in the schema and table names, but it seems that when the tables are created they are created in lowercase, so they then can't be found when the code runs. I only found this when I injected the IDistributedCache in the PageModel, as it does throw an exception there. Changed the schema and table name to all lowercase and it works a charm. Thanks

matt748 commented 2 years ago

Might be worth updating the documentation to state that lowercase names are required?

leonibr commented 2 years ago

Actually yes, I think I can update to use both forms, I will look into this