Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a5436c3

Browse files
author
Mejin Leechor
authored
Merge pull request #31 from adifiore/master
Working dev build and non-mini production build
2 parents 0e0b483 + 927e7ca commit a5436c3

File tree

9 files changed

+5997
-166
lines changed

9 files changed

+5997
-166
lines changed

‎SSRtest/LRUCache.js‎

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,21 @@ export default class ComponentCache {
99
};
1010
}
1111

12-
this.storage = LRU({
12+
this.storage = lru({
1313
max: config.max || 1000000000,
1414
length: (n, key) => {
1515
return n.length + key.length;
1616
}
17-
});
17+
});
18+
}
1819

19-
}
20-
}
20+
get(cacheKey, cb) {
21+
let reply = this.storage.get(cacheKey);
22+
cb(null,reply);
23+
}
24+
25+
set(cacheKey, html) {
26+
this.storage.set(cacheKey, html);
27+
}
28+
29+
}

‎SSRtest/ModifiedReact.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2660,9 +2660,9 @@ async function renderToString(element, cache, memLife=0) {
26602660
* such as data-react-id that React uses internally.
26612661
* See https://reactjs.org/docs/react-dom-server.html#rendertostaticmarkup
26622662
*/
2663-
function renderToStaticMarkup(element, cache, memLife=0) {
2663+
asyncfunction renderToStaticMarkup(element, cache, memLife=0) {
26642664
var renderer = new ReactDOMServerRenderer(element, true);
2665-
var markup = renderer.read(Infinity, cache, false, null, memLife);
2665+
var markup = awaitrenderer.read(Infinity, cache, false, null, memLife);
26662666
return markup;
26672667
}
26682668

‎SSRtest/ZeeFile.js‎

Whitespace-only changes.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /