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

Mentions plugin cache #1969

Closed
mlewand opened this issue May 11, 2018 · 1 comment
Closed

Mentions plugin cache #1969

mlewand opened this issue May 11, 2018 · 1 comment
Labels
changelog:skip A changelog entry should not be added for a given issue. plugin:mentions The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. target:major Any docs related issue that should be merged into a major branch. type:feature A feature request.
Milestone

Comments

@mlewand
Copy link
Contributor

mlewand commented May 11, 2018

Are you reporting a feature request or a bug?

Feature request

Provide detailed reproduction steps (if any)

Mentions responses should be cached.

Currently there's an issue that each typed character after initial mention match causes a HTTP query. That would result with a terrible performance.

Take this case as an example:

  1. Create editor with below code:
CKEDITOR.replace( 'editor', {
	width: 600,
	mentions: [ {
		feed: 'feed.json?query={encodedQuery}',
		minChars: 1,
		marker: '@'
	} ],
	startupFocus: true
} );
  1. This is optional but you might want to create a dummy feed.json file.
  2. Type "@sampleContent" in the editor, and then use backspace to remove some characters.

Expected result

Mentions plugin caches the previous answers.

The cache should be implemented based on URL requested (ofc final url, meaning that it should consider template output). Also it is important to note that the cache should be shared globally across all of the instances.

Actual result

Each trigger causes a HTTP request. Here's inspector showing the requests:

Network inspector showing multiple stray requests

Other details

  • Browser: …
  • OS: …
  • CKEditor version: …
  • Installed CKEditor plugins: …
@mlewand mlewand added type:feature A feature request. status:confirmed An issue confirmed by the development team. target:major Any docs related issue that should be merged into a major branch. plugin:mentions The plugin which probably causes the issue. labels May 11, 2018
@mlewand mlewand added this to the 4.10.0 milestone May 11, 2018
@mlewand
Copy link
Contributor Author

mlewand commented May 18, 2018

Closed with #1977.

@mlewand mlewand closed this as completed May 18, 2018
@mlewand mlewand added the changelog:skip A changelog entry should not be added for a given issue. label May 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:skip A changelog entry should not be added for a given issue. plugin:mentions The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. target:major Any docs related issue that should be merged into a major branch. type:feature A feature request.
Projects
None yet
Development

No branches or pull requests

1 participant