Skip to content

Add reuse entries option#32

Merged
dlitvakb merged 2 commits intomasterfrom
dl/reuse-entries
May 2, 2018
Merged

Add reuse entries option#32
dlitvakb merged 2 commits intomasterfrom
dl/reuse-entries

Conversation

@dlitvakb
Copy link
Contributor

@dlitvakb dlitvakb commented May 2, 2018

Copy link

@dborsatto dborsatto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do you handle entries or assets built using different locales?

In the PHP SDK I use a similar mechanism where I keep objects in memory, but for entries and assets the cache keys contain the locale as well (it's something like Asset-5rk09fujeeoiw-en-US).

If I don't use the locale as part of the cache key I might end up with possible conflicts, due to assets/entries being fetched from the cache having a different locale (or no locale at all) from the one you're currently using. I suspect you might have the same issue here, but you probably can just solve it by changing cache_key in resource.py#45 🙂

@dlitvakb
Copy link
Contributor Author

dlitvakb commented May 2, 2018

Hmm, this is interesting, I could make it locale aware. I'll take a look into it.

@dlitvakb dlitvakb merged commit d50832d into master May 2, 2018
@dlitvakb dlitvakb deleted the dl/reuse-entries branch May 2, 2018 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants