Pass values for `data` and `cache` through options
See original GitHub issueIn ajax.js declared ajax
function:
function ajax(url, options, callback, data, cache) {
I don’t see a way to pass data
and cache
parameters from outside. It would be handy for adding build version:
backend: {
// add build version to reset browser cache
loadPath: '{{ns}}/translation_{{lng}}.json'
data: { v: buildVersion }
}
Could be implemented like this:
function ajax(url, options, callback, data, cache) {
data = data || options.data;
cache = cache || options.cache;
// Must encode data
if(data && typeof data === 'object') {
...
Currently I add parameters likes this:
backend: {
// add build version to reset browser cache
loadPath: '{{ns}}/translation_{{lng}}.json?v=' + buildVersion,
}
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Reading and writing data to the cache - Apollo GraphQL Docs
Watched queries can control what happens when they're invalidated by updates to the cache, by passing options like fetchPolicy and nextFetchPolicy to client....
Read more >The Cache API: A quick guide - web.dev
To open a cache, use the caches.open(name) method, passing the name of the cache as the single parameter. If the named cache does...
Read more >Read-Through, Write-Through, Refresh-Ahead and Write ...
In this scenario, the application can control when updated values in the cache are written to the data store. The most common use...
Read more >What is Caching and How it Works | AWS
Caching allows you to efficiently reuse previously retrieved or computed data. How does Caching work? The data in a cache is generally stored...
Read more >Cache for Top-Level Integration Procedure Data
When you test an Integration Procedure that uses top-level caching in the Preview tab, you can use two caching settings in the Options...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I can’t push my branch for some reason. I will try to fight it tomorrow. Otherwise I will just post gist with my changes
merged