Permalink
Browse files

Remove check for open_ssl

  • Loading branch information...
1 parent c6eec74 commit d6d9b68b1e3c8bc24d5de407202fdf4b421749e3 @akaspin committed Oct 29, 2010
Showing with 4 additions and 13 deletions.
  1. +1 −11 index.js
  2. +3 −2 readme.md
View
@@ -1,13 +1,5 @@
var path = require("path");
-
-// openssl support
-var have_openssl;
-try {
- var crypto = require('crypto');
- have_openssl=true;
-} catch (e) {
- have_openssl=false;
-}
+var crypto = require('crypto');
var parser = require("./parser");
var compiler = require("./compiler");
@@ -29,11 +21,9 @@ function compile(origin, options, callback) {
// If caching enabled -
if (key) {
- if (have_openssl) {
// if have openssl, add options hash to key
key += crypto.createHash("sha1").
update(options).digest("hex");
- }
cache.operate(key,
function(fn) { // getter
callback(undefined, fn);
View
@@ -576,8 +576,7 @@ you can set `options.cache` parameter to `false`.
nun.render(__dirname + "/file.html", {}, { cache: false }, ...);
If you set different options for one template file, *nun* caching will consider
-them as two different templates. This only working if *node.js* compiled with
-openssl support. Without openssl support, templates cached only for file name.
+them as two different templates.
### Compressing whitespace
@@ -587,6 +586,8 @@ compile-phase filters, you can compress all whitespace in template by setting
nun.render(__dirname + "/file.html", {}, { compress: true }, ...);
+**`node.js` must be compiled with openssl support.**
+
## How Nun...
### ... use paths?

0 comments on commit d6d9b68

Please sign in to comment.