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

refactor: move global Q config to document links #13

Merged
merged 2 commits into from Jun 22, 2021

Conversation

adamdbradley
Copy link
Contributor

No description provided.

Copy link
Contributor

@mhevery mhevery left a comment

Choose a reason for hiding this comment

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

Conditionally approve on fixing the caches per our discussion.

src/core/import/qImport.ts Outdated Show resolved Hide resolved
base: Element | Document | string | QConfig,
url: string | QRL<T> | URL
): T | Promise<T> {
export function qImport<T>(base: Element | Document, url: string | QRL<T> | URL): T | Promise<T> {
if (!importCache) importCache = new Map<string, unknown | Promise<unknown>>();
Copy link
Contributor

Choose a reason for hiding this comment

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

As it stands now, I think this will not behave correctly. On a server, one can serve different apps. These apps will have different configurations but may have the same protocol. The above will leak data between the applications. Let's remove this cache altogether.

src/core/render/jsx/mark_dirty.ts Outdated Show resolved Hide resolved
src/core/render/jsx/render.unit.tsx Show resolved Hide resolved
@adamdbradley adamdbradley merged commit 2d79d92 into QwikDev:main Jun 22, 2021
@adamdbradley adamdbradley deleted the remove-global-q branch June 22, 2021 04:03
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.

None yet

2 participants