I am storing a POCO that contains a couple of objects from the Stripe nuget package (Subscription and Customer) in redis cache.
my service does this:
var acct = new SubscriptionAccount() { ....};
acct.stripe_subscription = results from Stripe.SubscriptionService.Create(..)
base.cache.Set(key,acct);
return acct;
the results from the method have the subscription items.
When I retrieve the account back from cache… the items value in stripe_subscription is null
(it’s not null in redis)
here’s the poco
public class SubscriptionAccount
{
public long acct_id { get; set; }
public string user_id { get; set; }
public string email_address { get; set; }
public string subscription_payment_id { get; set; }
public string api_key { get; set; }
public Subscription subscription { get; set; }
public DateTime created_date { get; set; }
public DateTime start_current_month { get; set; }
public Stripe.Subscription stripe_subscription { get; set; }
public Stripe.Customer stripe_customer { get; set; }
}