Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation not clear on when the cache setting comes into play for parsed PO files. #247

Open
shailendra333 opened this issue Sep 12, 2020 · 0 comments

Comments

@shailendra333
Copy link

  • Which version of Django are you using?: 2.2
  • Which version of django-rosetta are you using?: 0.9.3

The document fails to mention an important fact that if the underlying po files are writable then even if a cache is configured and rosetta cache storage points to that (for e.g., using ROSETTA_STORAGE_CLASS = 'rosetta.storage.CacheRosettaStorage') - still this cache will not be used. Only when the file is not writable this setting comes into picture.

Also this is clear from the views.py of Rosetta

@cached_property
    def po_file(self):
        """Return the parsed .po file that is currently being translated/viewed.

 if self.po_file_is_writable:
            # If we can write changes to file, then we pull it up fresh with
            # each request.

.........................................
..........................................

        else:
            storage = get_storage(self.request)
            po_file = storage.get(self.po_file_cache_key, None)
@shailendra333 shailendra333 changed the title Document not clear on when the cache setting comes into play for parsed PO files. Documentation not clear on when the cache setting comes into play for parsed PO files. Sep 13, 2020
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

No branches or pull requests

1 participant