DrupalWinCache is an implementation of Drupal's DrupalCacheInterface interface for using wincache as cache.

This Drupal module make use of the PHP WinCache extension for caching key-value pairs. The PHP Wincache extension includes 5 different types of caches.

1. Opcode cache
2. File Cache
3. Resolve File Path Cache
4. User Cache
5. Session Handler Cache

This Drupal module uses UserCache feature, that uses Windows Shared Memory Cache for caching. The UserCache can be used to store PHP objects and variables and then re-used on subsequent requests. This can be used to improve performance of PHP scripts when running in IIS.

By default Drupal uses DrupalDatabaseCache (an implementation of DrupalCacheInterface) which uses database for caching. Please refer readme.txt for the instructions to configure Drupal to use DrupalWinCache.

git clone http://git.drupal.org:sandbox/microsoft/1441326.git drupalwincache

// edit
project page: http://drupal.org/sandbox/microsoft/1441326

Support for Drupal 7

Comments

patrickd’s picture

Status: Needs review » Needs work

welcome,

I added the missing link to your project page.

You are working in the "master" branch in git. You should really be working in a version specific branch. The most direct documentation on this is Moving from a master branch to a version branch. For additional resources please see the documentation about release naming conventions and creating a branch in git.
(At least this has to be done before switching back to needs review)

while waiting for an in-depht review of your module you can start out fixing some coding style issues detected by automated tools:
http://ventral.org/pareview/httpgitdrupalorgsandboxmicrosoft1441326git

You can also get a review bonus and we will come back to your application sooner.

regards

granola’s picture

thanks for the tip. we'll fix that styling issue.
best,
g

patrickd’s picture

Please identify yourself to git, so all commits will be referenced with your useraccount.

I'm a little confused of the users with this sandbox, the initial commits were made by anu_t_chandy but you're applying for full-project-permission - is that correct?

granola’s picture

Hi Patrick

Yep - Anu has been submitting the code which was a v-team effort over here at MS. I'm just sheperding it along as the PM... All committers in this project sandbox are with Microsoft.

Thanks
Grace Francisco

patrickd’s picture

Okay,
please note that all committers should have their own user-accounts on d.o.
As you're the PM I think it's okay if you'll be the vetted user - then you can create and promote new projects but you have to add other team-members/developers as co-maintainers.

If there is a main drupal-developer in your team that has done most of the work I'd rather make him/her a vetted user, otherwise it's okay.

Don't forget to switch back to "needs review" when you're ready to proceed.

anu_t_chandy’s picture

Priority: Normal » Critical
Status: Needs work » Needs review

Hi Patrick,

I have changed the status to "needs review", could you please do needful.
We created a branch 7.x-1.x and removed the files from master.

Thanks & Regards,
Anu

patrickd’s picture

Priority: Critical » Normal

Sorry, please follow the application workflow and how to use priorities.

If you want to speed up the process, please get a review bonus and we will come back to your application sooner.

anu_t_chandy’s picture

Hi Patrick,

Sorry I am new to sandbox related stuff, was not aware about the application workflow.

I have fixed the issues you pointed and changed the status to "need review", Could you please do needful?

Thanks & Regards,
Anu

bulldozer2003’s picture

Since this probably needs more experienced eyes on it, it would be a good idea to work in the review bonus program to get more eyes on this application.

novalnet’s picture

Status: Needs review » Needs work

Hello ,

Manual Review :

1. Please use l() to create link markup, dont create it by your own in drupalwincache.install line 34.
2. Also try to avoid using HTML inside t() or get_t() in drupalwincache.install.
3. Use theme/module name as a prefix to the function name to avoid name clashes in drupal_win_cache.inc.
4. From line 109 to 115, it would be better if you use /* */ instead of // in drupal_win_cache.inc.
5.It seems there are some minor issues in PAREVIEW.So please clear it.

Thanks,

anu_chandy’s picture

Status: Needs work » Needs review

Hi @Novalnet,

Thanks much for the review comments. I have addressed 1, 2, 4 and 5.
Regarding 3 [Use theme/module name as a prefix to the function name to avoid name clashes in drupal_win_cache.inc.], please note that this module actually implements the methods in Drupal cache interface 'DrupalCacheInterface', so we cannot change the name of these methods.

Could you please review the changes?

Thanks & Regards,
Anu

krylov’s picture

Hi,
Sorry, I am confused on how this works.
Please include on the project page and/or in the README:
1. where is the drupal_win_cache.inc file used?
2. where is the DrupalWinCache class instantiated?
3. on lines 26-27 of drupal_win_cache.inc wouldn't it make sense to check if $bin is what you expect?

krylov’s picture

Issue summary: View changes

added missing project link

anu_t_chandy’s picture

Hi Krylov,

Thank you for the review comments.

I have updated project page with more details. Just putting the same content here:

"DrupalWinCache is an implementation of Drupal's DrupalCacheInterface interface for using wincache as cache. By default Drupal uses DrupalDatabaseCache (an implementation of DrupalCacheInterface) which uses database for caching. Please refer readme.txt for the instructions to configure Drupal to use DrupalWinCache."

The readme.txt file already contains details about how to use this module : http://drupalcode.org/sandbox/microsoft/1441326.git/blob/ad3fb4865fc8916...

You can find similar implementation to use MongoDB as cache here: http://drupal.org/project/mongodb

Thanks
Anu

jrsinclair’s picture

First of all, I'm very excited to see this module applying for full project status. I've been working with a number of IIS Drupal sites that could benefit from it.

There are quite a few issues showing up in PAReview: http://ventral.org/pareview/httpgitdrupalorgsandboxmicrosoft1441326-7x-1x , but I recognise that the comment about line 34 of drupalwincache.install is a false positive. All the same, if this is a Microsoft-supported project, it is entirely possible that people will be looking at modules like this assuming they will be good examples of how to code for Drupal. Please don't disappoint them.

There are a few minor things that need correcting after a manual read-through:

  1. Please make the 7.x-1.x the default branch (see http://drupal.org/node/1127732 for intstructions)
  2. On line 56 of drupalwincache.module, you probably mean t('Type') rather than ('Type')
  3. As a minor style point, line 34 of drupalwincache.install could be broken over two (or more) lines to make it a little narrower.
  4. The description on line 2 of drupalwincache.info could possibly be a little bit more… descriptive. Perhaps something like:
    Allows Drupal to use the WinCache PHP optimizer as an alternative to database cache storage.
devin carlson’s picture

Status: Needs review » Needs work

It looks like this is needs work per #14.

klausi’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. Feel free to reopen if you are still working on this application.

david_garcia’s picture

Status: Closed (won't fix) » Needs work

Tested actual code on production sites for a few months now, incredible performance improvements.

klausi’s picture

Status: Needs work » Closed (won't fix)

This project application is closed since we didn't hear back from the applicant. Feel free to fork this project if you want to promote it.

klausi’s picture

Issue summary: View changes

added more details about the module