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

cache isCached state for scss resources #10377

Merged
merged 2 commits into from
Jul 25, 2018
Merged

Conversation

icewind1991
Copy link
Member

This saves a significant amount of filecache operations when loading a page.

This extra caching layer is disabled when debug mode is enabled to ensure it doesn't get in the way of development

Signed-off-by: Robin Appelman <robin@icewind.nl>
@icewind1991 icewind1991 added the 3. to review Waiting for reviews label Jul 24, 2018
@icewind1991 icewind1991 added this to the Nextcloud 14 milestone Jul 24, 2018
@skjnldsv skjnldsv added feature: scss feature: caching Related to our caching system: scssCacher, jsCombiner... enhancement labels Jul 24, 2018
Copy link
Member

@skjnldsv skjnldsv left a comment

Choose a reason for hiding this comment

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

Code make sense! :)

Copy link
Member

@MorrisJobke MorrisJobke left a comment

Choose a reason for hiding this comment

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

Teste and works 👍

@MorrisJobke MorrisJobke added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Jul 24, 2018
@MorrisJobke
Copy link
Member

MorrisJobke commented Jul 24, 2018

Unit tests fail:

1) Test\Template\SCSSCacherTest::testIsCachedNoFile
TypeError: Argument 2 passed to OC\Template\SCSSCacher::isCached() must be of the type string, object given

/drone/src/github.com/nextcloud/server/lib/private/Template/SCSSCacher.php:181
/drone/src/github.com/nextcloud/server/tests/lib/TestCase.php:210
/drone/src/github.com/nextcloud/server/tests/lib/Template/SCSSCacherTest.php:262

2) Test\Template\SCSSCacherTest::testIsCachedNoDepsFile
TypeError: Argument 2 passed to OC\Template\SCSSCacher::isCached() must be of the type string, object given

/drone/src/github.com/nextcloud/server/lib/private/Template/SCSSCacher.php:181
/drone/src/github.com/nextcloud/server/tests/lib/TestCase.php:210
/drone/src/github.com/nextcloud/server/tests/lib/Template/SCSSCacherTest.php:283

@MorrisJobke MorrisJobke added 2. developing Work in progress and removed 4. to release Ready to be released and/or waiting for tests to finish labels Jul 25, 2018
@MorrisJobke MorrisJobke mentioned this pull request Jul 25, 2018
21 tasks
@MorrisJobke
Copy link
Member

Let me check if I can fix the tests.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
@MorrisJobke
Copy link
Member

Let me check if I can fix the tests.

Fixed them. They worked locally. Let's wait for CI then.

@MorrisJobke MorrisJobke added 4. to release Ready to be released and/or waiting for tests to finish and removed 2. developing Work in progress labels Jul 25, 2018
@MorrisJobke MorrisJobke merged commit 8255faa into master Jul 25, 2018
@MorrisJobke MorrisJobke deleted the sccs-cache-iscached branch July 25, 2018 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish enhancement feature: caching Related to our caching system: scssCacher, jsCombiner... feature: scss
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants